aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-08-11 19:23:40 -0700
committerBryan Newbold <bnewbold@robocracy.org>2022-08-11 19:23:40 -0700
commitef79f4d157fc576eeb0f54e01d827f277de35708 (patch)
treea33f1249fa386ab7970cd677be840c15924dc319
parent2c4ea805675cee28fbbfae773420a853820f875d (diff)
downloadfatcat-ef79f4d157fc576eeb0f54e01d827f277de35708.tar.gz
fatcat-ef79f4d157fc576eeb0f54e01d827f277de35708.zip
codegen python client using newer generator (v6.0.1)
-rw-r--r--python_openapi_client/README.md73
-rw-r--r--python_openapi_client/fatcat_openapi_client/__init__.py51
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/__init__.py9
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/auth_api.py446
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/changelog_api.py298
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/containers_api.py1655
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/creators_api.py1750
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/default_api.py11278
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/editgroups_api.py1046
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/editors_api.py750
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/files_api.py1627
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/filesets_api.py1463
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/releases_api.py2106
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/webcaptures_api.py1463
-rw-r--r--python_openapi_client/fatcat_openapi_client/api/works_api.py1602
-rw-r--r--python_openapi_client/fatcat_openapi_client/api_client.py796
-rw-r--r--python_openapi_client/fatcat_openapi_client/apis/__init__.py27
-rw-r--r--python_openapi_client/fatcat_openapi_client/configuration.py289
-rw-r--r--python_openapi_client/fatcat_openapi_client/exceptions.py54
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/__init__.py5
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/auth_oidc.py288
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/auth_oidc_result.py282
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/auth_token_result.py270
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/changelog_entry.py292
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/container_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/container_entity.py346
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/creator_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/creator_entity.py326
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/editgroup.py318
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/editgroup_annotation.py306
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/editgroup_edits.py294
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/editor.py290
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/entity_edit.py322
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/entity_history_entry.py292
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/error_response.py282
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/file_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/file_entity.py358
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/file_url.py276
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/fileset_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/fileset_entity.py332
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/fileset_file.py308
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/fileset_url.py276
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_abstract.py280
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_contrib.py306
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_entity.py440
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_ext_ids.py316
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/release_ref.py296
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/success.py276
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/webcapture_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/webcapture_cdx_line.py312
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/webcapture_entity.py340
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/webcapture_url.py276
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/work_auto_batch.py284
-rw-r--r--python_openapi_client/fatcat_openapi_client/model/work_entity.py302
-rw-r--r--python_openapi_client/fatcat_openapi_client/model_utils.py2059
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/__init__.py92
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/auth_oidc.py203
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/auth_token_result.py114
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/changelog_entry.py200
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/container_entity.py517
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/creator_entity.py423
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/editgroup.py375
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py297
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py269
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/editor.py234
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/entity_edit.py320
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py168
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/error_response.py168
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/file_entity.py541
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/file_url.py145
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/fileset_entity.py411
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/fileset_file.py301
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/fileset_url.py143
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_abstract.py205
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_contrib.py343
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_entity.py1052
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py479
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/release_ref.py317
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/success.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py327
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py467
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/webcapture_url.py145
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py141
-rw-r--r--python_openapi_client/fatcat_openapi_client/models/work_entity.py277
-rw-r--r--python_openapi_client/fatcat_openapi_client/rest.py118
-rw-r--r--python_openapi_client/tests/codegen/test_auth_api.py47
-rw-r--r--python_openapi_client/tests/codegen/test_auth_oidc.py12
-rw-r--r--python_openapi_client/tests/codegen/test_auth_oidc_result.py14
-rw-r--r--python_openapi_client/tests/codegen/test_auth_token_result.py12
-rw-r--r--python_openapi_client/tests/codegen/test_changelog_api.py41
-rw-r--r--python_openapi_client/tests/codegen/test_changelog_entry.py14
-rw-r--r--python_openapi_client/tests/codegen/test_container_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_container_entity.py12
-rw-r--r--python_openapi_client/tests/codegen/test_containers_api.py95
-rw-r--r--python_openapi_client/tests/codegen/test_creator_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_creator_entity.py12
-rw-r--r--python_openapi_client/tests/codegen/test_creators_api.py101
-rw-r--r--python_openapi_client/tests/codegen/test_default_api.py610
-rw-r--r--python_openapi_client/tests/codegen/test_editgroup.py18
-rw-r--r--python_openapi_client/tests/codegen/test_editgroup_annotation.py14
-rw-r--r--python_openapi_client/tests/codegen/test_editgroup_edits.py14
-rw-r--r--python_openapi_client/tests/codegen/test_editgroups_api.py71
-rw-r--r--python_openapi_client/tests/codegen/test_editor.py12
-rw-r--r--python_openapi_client/tests/codegen/test_editors_api.py59
-rw-r--r--python_openapi_client/tests/codegen/test_entity_edit.py12
-rw-r--r--python_openapi_client/tests/codegen/test_entity_history_entry.py18
-rw-r--r--python_openapi_client/tests/codegen/test_error_response.py12
-rw-r--r--python_openapi_client/tests/codegen/test_file_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_file_entity.py16
-rw-r--r--python_openapi_client/tests/codegen/test_file_url.py12
-rw-r--r--python_openapi_client/tests/codegen/test_files_api.py95
-rw-r--r--python_openapi_client/tests/codegen/test_fileset_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_fileset_entity.py18
-rw-r--r--python_openapi_client/tests/codegen/test_fileset_file.py12
-rw-r--r--python_openapi_client/tests/codegen/test_fileset_url.py12
-rw-r--r--python_openapi_client/tests/codegen/test_filesets_api.py89
-rw-r--r--python_openapi_client/tests/codegen/test_release_abstract.py12
-rw-r--r--python_openapi_client/tests/codegen/test_release_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_release_contrib.py14
-rw-r--r--python_openapi_client/tests/codegen/test_release_entity.py28
-rw-r--r--python_openapi_client/tests/codegen/test_release_ext_ids.py12
-rw-r--r--python_openapi_client/tests/codegen/test_release_ref.py12
-rw-r--r--python_openapi_client/tests/codegen/test_releases_api.py113
-rw-r--r--python_openapi_client/tests/codegen/test_success.py12
-rw-r--r--python_openapi_client/tests/codegen/test_webcapture_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_webcapture_cdx_line.py12
-rw-r--r--python_openapi_client/tests/codegen/test_webcapture_entity.py18
-rw-r--r--python_openapi_client/tests/codegen/test_webcapture_url.py12
-rw-r--r--python_openapi_client/tests/codegen/test_webcaptures_api.py89
-rw-r--r--python_openapi_client/tests/codegen/test_work_auto_batch.py16
-rw-r--r--python_openapi_client/tests/codegen/test_work_entity.py12
-rw-r--r--python_openapi_client/tests/codegen/test_works_api.py95
140 files changed, 28991 insertions, 22373 deletions
diff --git a/python_openapi_client/README.md b/python_openapi_client/README.md
index 316b9dfd..640bb817 100644
--- a/python_openapi_client/README.md
+++ b/python_openapi_client/README.md
@@ -1,5 +1,7 @@
# fatcat-openapi-client
-Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata.
+Fatcat is a scalable, versioned, API-oriented catalog of bibliographic
+entities and file metadata.
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
@@ -10,7 +12,7 @@ For more information, please visit [https://fatcat.wiki](https://fatcat.wiki)
## Requirements.
-Python 3.5+
+Python >=3.6
## Installation & Usage
### pip install
@@ -24,7 +26,7 @@ pip install fatcat-openapi-client
Then import the package:
```python
-import fatcat_openapi_client
+import fatcat_openapi_client
```
### Setuptools
@@ -46,30 +48,65 @@ import fatcat_openapi_client
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
-from __future__ import print_function
+
import time
import fatcat_openapi_client
-from fatcat_openapi_client.rest import ApiException
from pprint import pprint
+from fatcat_openapi_client.api import default_api
+from fatcat_openapi_client.model.auth_oidc import AuthOidc
+from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult
+from fatcat_openapi_client.model.auth_token_result import AuthTokenResult
+from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
+from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch
+from fatcat_openapi_client.model.container_entity import ContainerEntity
+from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+from fatcat_openapi_client.model.editor import Editor
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch
+from fatcat_openapi_client.model.file_entity import FileEntity
+from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.success import Success
+from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch
+from fatcat_openapi_client.model.work_entity import WorkEntity
+# Defining the host is optional and defaults to https://api.fatcat.wiki/v0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = fatcat_openapi_client.Configuration(
+ host = "https://api.fatcat.wiki/v0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
-configuration = fatcat_openapi_client.Configuration()
# Configure API key authorization: Bearer
-configuration.api_key['Authorization'] = 'YOUR_API_KEY'
+configuration.api_key['Bearer'] = 'YOUR_API_KEY'
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['Authorization'] = 'Bearer'
+# configuration.api_key_prefix['Bearer'] = 'Bearer'
-# Defining host is optional and default to https://api.fatcat.wiki/v0
-configuration.host = "https://api.fatcat.wiki/v0"
-# Create an instance of the API class
-api_instance = fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(configuration))
-editgroup_id = 'editgroup_id_example' # str | base32-encoded unique identifier
-try:
- api_response = api_instance.accept_editgroup(editgroup_id)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->accept_editgroup: %s\n" % e)
+# Enter a context with an instance of the API client
+with fatcat_openapi_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = default_api.DefaultApi(api_client)
+ editgroup_id = "editgroup_id_example" # str | base32-encoded unique identifier
+ try:
+ api_response = api_instance.accept_editgroup(editgroup_id)
+ pprint(api_response)
+ except fatcat_openapi_client.ApiException as e:
+ print("Exception when calling DefaultApi->accept_editgroup: %s\n" % e)
```
## Documentation for API Endpoints
diff --git a/python_openapi_client/fatcat_openapi_client/__init__.py b/python_openapi_client/fatcat_openapi_client/__init__.py
index 8749264e..6955acbd 100644
--- a/python_openapi_client/fatcat_openapi_client/__init__.py
+++ b/python_openapi_client/fatcat_openapi_client/__init__.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-
# flake8: noqa
"""
@@ -13,55 +11,18 @@
"""
-from __future__ import absolute_import
-
-__version__ = "0.5.0"
-
-# import apis into sdk package
-from fatcat_openapi_client.api.default_api import DefaultApi
+__version__ = "0.5.1"
# import ApiClient
from fatcat_openapi_client.api_client import ApiClient
+
+# import Configuration
from fatcat_openapi_client.configuration import Configuration
+
+# import exceptions
from fatcat_openapi_client.exceptions import OpenApiException
+from fatcat_openapi_client.exceptions import ApiAttributeError
from fatcat_openapi_client.exceptions import ApiTypeError
from fatcat_openapi_client.exceptions import ApiValueError
from fatcat_openapi_client.exceptions import ApiKeyError
from fatcat_openapi_client.exceptions import ApiException
-# import models into sdk package
-from fatcat_openapi_client.models.auth_oidc import AuthOidc
-from fatcat_openapi_client.models.auth_oidc_result import AuthOidcResult
-from fatcat_openapi_client.models.auth_token_result import AuthTokenResult
-from fatcat_openapi_client.models.changelog_entry import ChangelogEntry
-from fatcat_openapi_client.models.container_auto_batch import ContainerAutoBatch
-from fatcat_openapi_client.models.container_entity import ContainerEntity
-from fatcat_openapi_client.models.creator_auto_batch import CreatorAutoBatch
-from fatcat_openapi_client.models.creator_entity import CreatorEntity
-from fatcat_openapi_client.models.editgroup import Editgroup
-from fatcat_openapi_client.models.editgroup_annotation import EditgroupAnnotation
-from fatcat_openapi_client.models.editgroup_edits import EditgroupEdits
-from fatcat_openapi_client.models.editor import Editor
-from fatcat_openapi_client.models.entity_edit import EntityEdit
-from fatcat_openapi_client.models.entity_history_entry import EntityHistoryEntry
-from fatcat_openapi_client.models.error_response import ErrorResponse
-from fatcat_openapi_client.models.file_auto_batch import FileAutoBatch
-from fatcat_openapi_client.models.file_entity import FileEntity
-from fatcat_openapi_client.models.file_url import FileUrl
-from fatcat_openapi_client.models.fileset_auto_batch import FilesetAutoBatch
-from fatcat_openapi_client.models.fileset_entity import FilesetEntity
-from fatcat_openapi_client.models.fileset_file import FilesetFile
-from fatcat_openapi_client.models.fileset_url import FilesetUrl
-from fatcat_openapi_client.models.release_abstract import ReleaseAbstract
-from fatcat_openapi_client.models.release_auto_batch import ReleaseAutoBatch
-from fatcat_openapi_client.models.release_contrib import ReleaseContrib
-from fatcat_openapi_client.models.release_entity import ReleaseEntity
-from fatcat_openapi_client.models.release_ext_ids import ReleaseExtIds
-from fatcat_openapi_client.models.release_ref import ReleaseRef
-from fatcat_openapi_client.models.success import Success
-from fatcat_openapi_client.models.webcapture_auto_batch import WebcaptureAutoBatch
-from fatcat_openapi_client.models.webcapture_cdx_line import WebcaptureCdxLine
-from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity
-from fatcat_openapi_client.models.webcapture_url import WebcaptureUrl
-from fatcat_openapi_client.models.work_auto_batch import WorkAutoBatch
-from fatcat_openapi_client.models.work_entity import WorkEntity
-
diff --git a/python_openapi_client/fatcat_openapi_client/api/__init__.py b/python_openapi_client/fatcat_openapi_client/api/__init__.py
index cdd759f9..b4143758 100644
--- a/python_openapi_client/fatcat_openapi_client/api/__init__.py
+++ b/python_openapi_client/fatcat_openapi_client/api/__init__.py
@@ -1,6 +1,3 @@
-from __future__ import absolute_import
-
-# flake8: noqa
-
-# import apis into api package
-from fatcat_openapi_client.api.default_api import DefaultApi
+# do not import all apis into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all apis from one package, import them with
+# from fatcat_openapi_client.apis import AuthApi
diff --git a/python_openapi_client/fatcat_openapi_client/api/auth_api.py b/python_openapi_client/fatcat_openapi_client/api/auth_api.py
new file mode 100644
index 00000000..442edb51
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/auth_api.py
@@ -0,0 +1,446 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.auth_oidc import AuthOidc
+from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult
+from fatcat_openapi_client.model.auth_token_result import AuthTokenResult
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.success import Success
+
+
+class AuthApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.auth_check_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/auth/check',
+ 'operation_id': 'auth_check',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'role',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'role':
+ (str,),
+ },
+ 'attribute_map': {
+ 'role': 'role',
+ },
+ 'location_map': {
+ 'role': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.auth_oidc_endpoint = _Endpoint(
+ settings={
+ 'response_type': (AuthOidcResult,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/auth/oidc',
+ 'operation_id': 'auth_oidc',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'oidc_params',
+ ],
+ 'required': [
+ 'oidc_params',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'oidc_params':
+ (AuthOidc,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'oidc_params': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_auth_token_endpoint = _Endpoint(
+ settings={
+ 'response_type': (AuthTokenResult,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/auth/token/{editor_id}',
+ 'operation_id': 'create_auth_token',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editor_id',
+ 'duration_seconds',
+ ],
+ 'required': [
+ 'editor_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editor_id':
+ (str,),
+ 'duration_seconds':
+ (int,),
+ },
+ 'attribute_map': {
+ 'editor_id': 'editor_id',
+ 'duration_seconds': 'duration_seconds',
+ },
+ 'location_map': {
+ 'editor_id': 'path',
+ 'duration_seconds': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+
+ def auth_check(
+ self,
+ **kwargs
+ ):
+ """auth_check # noqa: E501
+
+ Verify that authentication (API token) is working as expected. The optional `role` parameter can be used to verify that the current account (editor) has permissions for the given role. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.auth_check(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ role (str): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.auth_check_endpoint.call_with_http_info(**kwargs)
+
+ def auth_oidc(
+ self,
+ oidc_params,
+ **kwargs
+ ):
+ """auth_oidc # noqa: E501
+
+ Login or create editor account using OIDC metadata (internal method). This method is used by privileged front-end tools (like the web interface service) to process editor logins using OpenID Connect (OIDC) and/or OAuth. Most accounts (including tool and bot accounts) do not have sufficient privileges to call this method, which requires the `admin` role. The method returns an API token; the HTTP status code indicates whether an existing account was logged in, or a new account was created. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.auth_oidc(oidc_params, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ oidc_params (AuthOidc):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ AuthOidcResult
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['oidc_params'] = \
+ oidc_params
+ return self.auth_oidc_endpoint.call_with_http_info(**kwargs)
+
+ def create_auth_token(
+ self,
+ editor_id,
+ **kwargs
+ ):
+ """create_auth_token # noqa: E501
+
+ Generate a new auth token for a given editor (internal method). This method is used by the web interface to generate API tokens for users. It can not be called by editors (human or bot) to generate new tokens for themselves, at least at this time. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_auth_token(editor_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editor_id (str):
+
+ Keyword Args:
+ duration_seconds (int): How long API token should be valid for (in seconds). [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ AuthTokenResult
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editor_id'] = \
+ editor_id
+ return self.create_auth_token_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/changelog_api.py b/python_openapi_client/fatcat_openapi_client/api/changelog_api.py
new file mode 100644
index 00000000..59e60ecf
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/changelog_api.py
@@ -0,0 +1,298 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+
+
+class ChangelogApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.get_changelog_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([ChangelogEntry],),
+ 'auth': [],
+ 'endpoint_path': '/changelog',
+ 'operation_id': 'get_changelog',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'limit',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_changelog_entry_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ChangelogEntry,),
+ 'auth': [],
+ 'endpoint_path': '/changelog/{index}',
+ 'operation_id': 'get_changelog_entry',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'index',
+ ],
+ 'required': [
+ 'index',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'index':
+ (int,),
+ },
+ 'attribute_map': {
+ 'index': 'index',
+ },
+ 'location_map': {
+ 'index': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+
+ def get_changelog(
+ self,
+ **kwargs
+ ):
+ """get_changelog # noqa: E501
+
+ Returns a list of the most recent changelog entries accepted (merged) into the catalog. List is sorted by changelog index in descending order. Note that the accepted timestamp roughly corresponds to order, but not strictly; there exist out-of-order timestamps on the order of several seconds. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. There are millions of entries; to paginate through all of them, use this method to discover the highest existing entry number, then request the entries using `get_changelog_entry` one at a time. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_changelog(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ limit (int): Maximum count of changelog entries to return in response. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [ChangelogEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.get_changelog_endpoint.call_with_http_info(**kwargs)
+
+ def get_changelog_entry(
+ self,
+ index,
+ **kwargs
+ ):
+ """get_changelog_entry # noqa: E501
+
+ Returns a single changelog entry. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_changelog_entry(index, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ index (int): Changelog index of entry to return
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ChangelogEntry
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['index'] = \
+ index
+ return self.get_changelog_entry_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/containers_api.py b/python_openapi_client/fatcat_openapi_client/api/containers_api.py
new file mode 100644
index 00000000..75e0b6d8
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/containers_api.py
@@ -0,0 +1,1655 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch
+from fatcat_openapi_client.model.container_entity import ContainerEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.success import Success
+
+
+class ContainersApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_container_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/container',
+ 'operation_id': 'create_container',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (ContainerEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_container_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/container/batch',
+ 'operation_id': 'create_container_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (ContainerAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_container_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/container/{ident}',
+ 'operation_id': 'delete_container',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_container_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/container/edit/{edit_id}',
+ 'operation_id': 'delete_container_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_container_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ContainerEntity,),
+ 'auth': [],
+ 'endpoint_path': '/container/{ident}',
+ 'operation_id': 'get_container',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_container_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/container/edit/{edit_id}',
+ 'operation_id': 'get_container_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_container_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/container/{ident}/history',
+ 'operation_id': 'get_container_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_container_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/container/{ident}/redirects',
+ 'operation_id': 'get_container_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_container_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ContainerEntity,),
+ 'auth': [],
+ 'endpoint_path': '/container/rev/{rev_id}',
+ 'operation_id': 'get_container_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.lookup_container_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ContainerEntity,),
+ 'auth': [],
+ 'endpoint_path': '/container/lookup',
+ 'operation_id': 'lookup_container',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'issnl',
+ 'issne',
+ 'issnp',
+ 'issn',
+ 'wikidata_qid',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'issnl',
+ 'issne',
+ 'issnp',
+ 'issn',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('issnl',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ ('issne',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ ('issnp',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ ('issn',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'issnl':
+ (str,),
+ 'issne':
+ (str,),
+ 'issnp':
+ (str,),
+ 'issn':
+ (str,),
+ 'wikidata_qid':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'issnl': 'issnl',
+ 'issne': 'issne',
+ 'issnp': 'issnp',
+ 'issn': 'issn',
+ 'wikidata_qid': 'wikidata_qid',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'issnl': 'query',
+ 'issne': 'query',
+ 'issnp': 'query',
+ 'issn': 'query',
+ 'wikidata_qid': 'query',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_container_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/container/{ident}',
+ 'operation_id': 'update_container',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (ContainerEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_container(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_container # noqa: E501
+
+ Create a single Container entity as part of an existing editgroup. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgroup or have `admin` role). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_container(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (ContainerEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_container_endpoint.call_with_http_info(**kwargs)
+
+ def create_container_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_container_auto_batch # noqa: E501
+
+ Create a set of Container entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_container_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (ContainerAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_container_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_container(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_container # noqa: E501
+
+ Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_container_edit`. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_container(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_container_endpoint.call_with_http_info(**kwargs)
+
+ def delete_container_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_container_edit # noqa: E501
+
+ Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_container_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_container_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_container(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_container # noqa: E501
+
+ Fetches a single container entity from the catalog. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_container(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For containers, none accepted (yet).. [optional]
+ hide (str): List of entity fields to elide in response. For containers, none accepted (yet).. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ContainerEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_container_endpoint.call_with_http_info(**kwargs)
+
+ def get_container_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_container_edit # noqa: E501
+
+ Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_container_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_container_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_container_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_container_history # noqa: E501
+
+ Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_container_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): Maximum number of changelog entries to return. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_container_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_container_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_container_redirects # noqa: E501
+
+ Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_container_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_container_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_container_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_container_revision # noqa: E501
+
+ Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_container_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_container`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_container`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ContainerEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_container_revision_endpoint.call_with_http_info(**kwargs)
+
+ def lookup_container(
+ self,
+ **kwargs
+ ):
+ """lookup_container # noqa: E501
+
+ Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.lookup_container(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ issnl (str): Linking ISSN (ISSN-L); will be one of either ISSN-E or ISSN-P. [optional]
+ issne (str): Electronic ISSN (ISSN-L). [optional]
+ issnp (str): Print ISSN (ISSN-P). [optional]
+ issn (str): Any of ISSN-L, ISSN-E, or ISSN-P. [optional]
+ wikidata_qid (str): [optional]
+ expand (str): List of sub-entities to expand in response. See `get_container`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_container`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ContainerEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.lookup_container_endpoint.call_with_http_info(**kwargs)
+
+ def update_container(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_container # noqa: E501
+
+ Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the request must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_container(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (ContainerEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_container_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/creators_api.py b/python_openapi_client/fatcat_openapi_client/api/creators_api.py
new file mode 100644
index 00000000..986db62c
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/creators_api.py
@@ -0,0 +1,1750 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.success import Success
+
+
+class CreatorsApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_creator_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/creator',
+ 'operation_id': 'create_creator',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (CreatorEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_creator_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/creator/batch',
+ 'operation_id': 'create_creator_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (CreatorAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_creator_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/creator/{ident}',
+ 'operation_id': 'delete_creator',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_creator_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/creator/edit/{edit_id}',
+ 'operation_id': 'delete_creator_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_endpoint = _Endpoint(
+ settings={
+ 'response_type': (CreatorEntity,),
+ 'auth': [],
+ 'endpoint_path': '/creator/{ident}',
+ 'operation_id': 'get_creator',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/creator/edit/{edit_id}',
+ 'operation_id': 'get_creator_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/creator/{ident}/history',
+ 'operation_id': 'get_creator_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/creator/{ident}/redirects',
+ 'operation_id': 'get_creator_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_releases_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([ReleaseEntity],),
+ 'auth': [],
+ 'endpoint_path': '/creator/{ident}/releases',
+ 'operation_id': 'get_creator_releases',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_creator_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (CreatorEntity,),
+ 'auth': [],
+ 'endpoint_path': '/creator/rev/{rev_id}',
+ 'operation_id': 'get_creator_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.lookup_creator_endpoint = _Endpoint(
+ settings={
+ 'response_type': (CreatorEntity,),
+ 'auth': [],
+ 'endpoint_path': '/creator/lookup',
+ 'operation_id': 'lookup_creator',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'orcid',
+ 'wikidata_qid',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'orcid',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('orcid',): {
+ 'max_length': 19,
+ 'min_length': 19,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'orcid':
+ (str,),
+ 'wikidata_qid':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'orcid': 'orcid',
+ 'wikidata_qid': 'wikidata_qid',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'orcid': 'query',
+ 'wikidata_qid': 'query',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_creator_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/creator/{ident}',
+ 'operation_id': 'update_creator',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (CreatorEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_creator(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_creator(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (CreatorEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_creator_endpoint.call_with_http_info(**kwargs)
+
+ def create_creator_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_creator_auto_batch # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_creator_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (CreatorAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_creator_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_creator(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_creator(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_creator_endpoint.call_with_http_info(**kwargs)
+
+ def delete_creator_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_creator_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_creator_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_creator_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For creators, none accepted (yet).. [optional]
+ hide (str): List of entity fields to elide in response. For creators, none accepted (yet).. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ CreatorEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_creator_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_creator_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_creator_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_creator_history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_creator_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_creator_redirects # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_creator_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator_releases(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_creator_releases # noqa: E501
+
+ Returns the set of Release entities having a `contrib` entry pointing to the creator entity. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator_releases(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ hide (str): List of entity fields to elide in response. See `get_release`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [ReleaseEntity]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_creator_releases_endpoint.call_with_http_info(**kwargs)
+
+ def get_creator_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_creator_revision # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_creator_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_creator`, though note that identifier-based expansions (like `releases`) will always be empty for revisions. . [optional]
+ hide (str): List of entity fields to elide in response. See `get_creator`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ CreatorEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_creator_revision_endpoint.call_with_http_info(**kwargs)
+
+ def lookup_creator(
+ self,
+ **kwargs
+ ):
+ """lookup_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.lookup_creator(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ orcid (str): ORCiD (https://orcid.org) identifier. [optional]
+ wikidata_qid (str): [optional]
+ expand (str): List of sub-entities to expand in response. See `get_creator`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_creator`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ CreatorEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.lookup_creator_endpoint.call_with_http_info(**kwargs)
+
+ def update_creator(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_creator # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_creator(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (CreatorEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_creator_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/default_api.py b/python_openapi_client/fatcat_openapi_client/api/default_api.py
deleted file mode 100644
index 66a581f6..00000000
--- a/python_openapi_client/fatcat_openapi_client/api/default_api.py
+++ /dev/null
@@ -1,11278 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.4.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-from __future__ import absolute_import
-
-import re # noqa: F401
-
-# python 2 and python 3 compatibility library
-import six
-
-from fatcat_openapi_client.api_client import ApiClient
-from fatcat_openapi_client.exceptions import (
- ApiTypeError,
- ApiValueError
-)
-
-
-class DefaultApi(object):
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None):
- if api_client is None:
- api_client = ApiClient()
- self.api_client = api_client
-
- def accept_editgroup(self, editgroup_id, **kwargs): # noqa: E501
- """accept_editgroup # noqa: E501
-
- Accept (\"merge\") the given editgroup into the catalog. The editgroup must be open (not already accepted), and the editor making this request must have the `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.accept_editgroup(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.accept_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501
-
- def accept_editgroup_with_http_info(self, editgroup_id, **kwargs): # noqa: E501
- """accept_editgroup # noqa: E501
-
- Accept (\"merge\") the given editgroup into the catalog. The editgroup must be open (not already accepted), and the editor making this request must have the `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.accept_editgroup_with_http_info(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method accept_editgroup" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `accept_editgroup`") # noqa: E501
-
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `accept_editgroup`, length must be less than or equal to `26`") # noqa: E501
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `accept_editgroup`, length must be greater than or equal to `26`") # noqa: E501
- if 'editgroup_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editgroup_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `accept_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/accept', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def auth_check(self, **kwargs): # noqa: E501
- """auth_check # noqa: E501
-
- Verify that authentication (API token) is working as expected. The optional `role` parameter can be used to verify that the current account (editor) has permissions for the given role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.auth_check(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str role:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.auth_check_with_http_info(**kwargs) # noqa: E501
-
- def auth_check_with_http_info(self, **kwargs): # noqa: E501
- """auth_check # noqa: E501
-
- Verify that authentication (API token) is working as expected. The optional `role` parameter can be used to verify that the current account (editor) has permissions for the given role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.auth_check_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str role:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['role'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method auth_check" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'role' in local_var_params:
- query_params.append(('role', local_var_params['role'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/auth/check', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def auth_oidc(self, oidc_params, **kwargs): # noqa: E501
- """auth_oidc # noqa: E501
-
- Login or create editor account using OIDC metadata (internal method). This method is used by privileged front-end tools (like the web interface service) to process editor logins using OpenID Connect (OIDC) and/or OAuth. Most accounts (including tool and bot accounts) do not have sufficient privileges to call this method, which requires the `admin` role. The method returns an API token; the HTTP status code indicates whether an existing account was logged in, or a new account was created. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.auth_oidc(oidc_params, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param AuthOidc oidc_params: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: AuthOidcResult
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.auth_oidc_with_http_info(oidc_params, **kwargs) # noqa: E501
-
- def auth_oidc_with_http_info(self, oidc_params, **kwargs): # noqa: E501
- """auth_oidc # noqa: E501
-
- Login or create editor account using OIDC metadata (internal method). This method is used by privileged front-end tools (like the web interface service) to process editor logins using OpenID Connect (OIDC) and/or OAuth. Most accounts (including tool and bot accounts) do not have sufficient privileges to call this method, which requires the `admin` role. The method returns an API token; the HTTP status code indicates whether an existing account was logged in, or a new account was created. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.auth_oidc_with_http_info(oidc_params, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param AuthOidc oidc_params: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(AuthOidcResult, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['oidc_params'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method auth_oidc" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'oidc_params' is set
- if ('oidc_params' not in local_var_params or
- local_var_params['oidc_params'] is None):
- raise ApiValueError("Missing the required parameter `oidc_params` when calling `auth_oidc`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'oidc_params' in local_var_params:
- body_params = local_var_params['oidc_params']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/auth/oidc', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='AuthOidcResult', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_auth_token(self, editor_id, **kwargs): # noqa: E501
- """create_auth_token # noqa: E501
-
- Generate a new auth token for a given editor (internal method). This method is used by the web interface to generate API tokens for users. It can not be called by editors (human or bot) to generate new tokens for themselves, at least at this time. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_auth_token(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param int duration_seconds: How long API token should be valid for (in seconds)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: AuthTokenResult
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_auth_token_with_http_info(editor_id, **kwargs) # noqa: E501
-
- def create_auth_token_with_http_info(self, editor_id, **kwargs): # noqa: E501
- """create_auth_token # noqa: E501
-
- Generate a new auth token for a given editor (internal method). This method is used by the web interface to generate API tokens for users. It can not be called by editors (human or bot) to generate new tokens for themselves, at least at this time. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_auth_token_with_http_info(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param int duration_seconds: How long API token should be valid for (in seconds)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(AuthTokenResult, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editor_id', 'duration_seconds'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_auth_token" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editor_id' is set
- if ('editor_id' not in local_var_params or
- local_var_params['editor_id'] is None):
- raise ApiValueError("Missing the required parameter `editor_id` when calling `create_auth_token`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editor_id' in local_var_params:
- path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501
-
- query_params = []
- if 'duration_seconds' in local_var_params:
- query_params.append(('duration_seconds', local_var_params['duration_seconds'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/auth/token/{editor_id}', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='AuthTokenResult', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_container(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_container # noqa: E501
-
- Create a single Container entity as part of an existing editgroup. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgroup or have `admin` role). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_container(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param ContainerEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_container_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_container_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_container # noqa: E501
-
- Create a single Container entity as part of an existing editgroup. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgroup or have `admin` role). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_container_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param ContainerEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_container" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_container`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_container`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/container', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_container_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_container_auto_batch # noqa: E501
-
- Create a set of Container entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_container_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param ContainerAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_container_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_container_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_container_auto_batch # noqa: E501
-
- Create a set of Container entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_container_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param ContainerAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_container_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_container_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/container/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_creator(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_creator(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param CreatorEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_creator_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_creator_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_creator_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param CreatorEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_creator" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_creator`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_creator`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/creator', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_creator_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_creator_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_creator_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param CreatorAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_creator_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_creator_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_creator_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_creator_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param CreatorAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_creator_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_creator_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/creator/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_editgroup(self, editgroup, **kwargs): # noqa: E501
- """create_editgroup # noqa: E501
-
- Creates a new editgroup. By default the editor making this request will be the author of the editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_editgroup(editgroup, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param Editgroup editgroup: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_editgroup_with_http_info(editgroup, **kwargs) # noqa: E501
-
- def create_editgroup_with_http_info(self, editgroup, **kwargs): # noqa: E501
- """create_editgroup # noqa: E501
-
- Creates a new editgroup. By default the editor making this request will be the author of the editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_editgroup_with_http_info(editgroup, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param Editgroup editgroup: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_editgroup" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup' is set
- if ('editgroup' not in local_var_params or
- local_var_params['editgroup'] is None):
- raise ApiValueError("Missing the required parameter `editgroup` when calling `create_editgroup`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'editgroup' in local_var_params:
- body_params = local_var_params['editgroup']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_editgroup_annotation(self, editgroup_id, annotation, **kwargs): # noqa: E501
- """create_editgroup_annotation # noqa: E501
-
- Submits a new annotation to the specified editgroup. The editgroup must be open (not already accepted). The annotation will automatically have authorship of the editor making this request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_editgroup_annotation(editgroup_id, annotation, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param EditgroupAnnotation annotation: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EditgroupAnnotation
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_editgroup_annotation_with_http_info(editgroup_id, annotation, **kwargs) # noqa: E501
-
- def create_editgroup_annotation_with_http_info(self, editgroup_id, annotation, **kwargs): # noqa: E501
- """create_editgroup_annotation # noqa: E501
-
- Submits a new annotation to the specified editgroup. The editgroup must be open (not already accepted). The annotation will automatically have authorship of the editor making this request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_editgroup_annotation_with_http_info(editgroup_id, annotation, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param EditgroupAnnotation annotation: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EditgroupAnnotation, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'annotation'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_editgroup_annotation" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_editgroup_annotation`") # noqa: E501
- # verify the required parameter 'annotation' is set
- if ('annotation' not in local_var_params or
- local_var_params['annotation'] is None):
- raise ApiValueError("Missing the required parameter `annotation` when calling `create_editgroup_annotation`") # noqa: E501
-
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `create_editgroup_annotation`, length must be less than or equal to `26`") # noqa: E501
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `create_editgroup_annotation`, length must be greater than or equal to `26`") # noqa: E501
- if 'editgroup_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editgroup_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `create_editgroup_annotation`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'annotation' in local_var_params:
- body_params = local_var_params['annotation']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/annotation', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EditgroupAnnotation', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_file(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_file(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param FileEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_file_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_file_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_file_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param FileEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_file" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_file`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_file`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/file', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_file_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_file_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_file_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param FileAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_file_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_file_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_file_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_file_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param FileAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_file_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_file_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/file/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_fileset(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_fileset(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param FilesetEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_fileset_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_fileset_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_fileset_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param FilesetEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_fileset" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_fileset`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_fileset`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/fileset', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_fileset_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_fileset_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_fileset_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param FilesetAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_fileset_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_fileset_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_fileset_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_fileset_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param FilesetAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_fileset_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_fileset_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/fileset/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_release(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_release # noqa: E501
-
- Create a single Release entity as part of an existing editgroup. If the `work_id` field is not set, a work entity will be created automatically and this field set pointing to the new work. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgrou p or have `admin` role). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_release(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param ReleaseEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_release_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_release_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_release # noqa: E501
-
- Create a single Release entity as part of an existing editgroup. If the `work_id` field is not set, a work entity will be created automatically and this field set pointing to the new work. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgrou p or have `admin` role). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_release_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param ReleaseEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_release" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_release`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_release`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/release', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_release_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_release_auto_batch # noqa: E501
-
- Create a set of Release entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_release_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param ReleaseAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_release_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_release_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_release_auto_batch # noqa: E501
-
- Create a set of Release entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_release_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param ReleaseAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_release_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_release_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/release/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_webcapture(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_webcapture(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param WebcaptureEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_webcapture_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_webcapture_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_webcapture_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param WebcaptureEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_webcapture" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_webcapture`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_webcapture`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/webcapture', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_webcapture_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_webcapture_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_webcapture_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param WebcaptureAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_webcapture_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_webcapture_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_webcapture_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_webcapture_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param WebcaptureAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_webcapture_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_webcapture_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/webcapture/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_work(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_work(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param WorkEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_work_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501
-
- def create_work_with_http_info(self, editgroup_id, entity, **kwargs): # noqa: E501
- """create_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_work_with_http_info(editgroup_id, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param WorkEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_work" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `create_work`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `create_work`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/work', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_work_auto_batch(self, auto_batch, **kwargs): # noqa: E501
- """create_work_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_work_auto_batch(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param WorkAutoBatch auto_batch: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.create_work_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501
-
- def create_work_auto_batch_with_http_info(self, auto_batch, **kwargs): # noqa: E501
- """create_work_auto_batch # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.create_work_auto_batch_with_http_info(auto_batch, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param WorkAutoBatch auto_batch: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['auto_batch'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_work_auto_batch" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'auto_batch' is set
- if ('auto_batch' not in local_var_params or
- local_var_params['auto_batch'] is None):
- raise ApiValueError("Missing the required parameter `auto_batch` when calling `create_work_auto_batch`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'auto_batch' in local_var_params:
- body_params = local_var_params['auto_batch']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/auto/work/batch', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_container(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_container # noqa: E501
-
- Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_container_edit`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_container(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_container_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_container_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_container # noqa: E501
-
- Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_container_edit`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_container_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_container" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_container`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_container`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/container/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_container_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_container_edit # noqa: E501
-
- Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_container_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_container_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_container_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_container_edit # noqa: E501
-
- Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_container_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_container_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_container_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_container_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/container/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_creator(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_creator(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_creator_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_creator_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_creator_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_creator" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_creator`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_creator`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/creator/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_creator_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_creator_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_creator_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_creator_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_creator_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_creator_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_creator_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_creator_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_creator_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_creator_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/creator/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_file(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_file(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_file_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_file_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_file_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_file" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_file`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_file`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/file/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_file_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_file_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_file_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_file_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_file_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_file_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_file_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_file_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_file_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_file_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/file/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_fileset(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_fileset(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_fileset_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_fileset_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_fileset_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_fileset" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_fileset`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_fileset`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/fileset/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_fileset_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_fileset_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_fileset_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_fileset_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_fileset_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_fileset_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_fileset_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_fileset_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_fileset_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_fileset_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/fileset/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_release(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_release # noqa: E501
-
- Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_release_edit`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_release(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_release_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_release_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_release # noqa: E501
-
- Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_release_edit`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_release_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_release" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_release`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_release`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/release/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_release_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_release_edit # noqa: E501
-
- Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_release_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_release_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_release_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_release_edit # noqa: E501
-
- Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_release_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_release_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_release_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_release_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/release/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_webcapture(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_webcapture(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_webcapture_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_webcapture_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_webcapture_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_webcapture" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_webcapture`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_webcapture`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/webcapture/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_webcapture_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_webcapture_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_webcapture_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_webcapture_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_webcapture_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_webcapture_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_webcapture_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_webcapture_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_webcapture_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_webcapture_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/webcapture/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_work(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_work(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_work_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501
-
- def delete_work_with_http_info(self, editgroup_id, ident, **kwargs): # noqa: E501
- """delete_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_work_with_http_info(editgroup_id, ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_work" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_work`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `delete_work`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/work/{ident}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_work_edit(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_work_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_work_edit(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Success
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_work_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501
-
- def delete_work_edit_with_http_info(self, editgroup_id, edit_id, **kwargs): # noqa: E501
- """delete_work_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.delete_work_edit_with_http_info(editgroup_id, edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Success, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_work_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `delete_work_edit`") # noqa: E501
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `delete_work_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/work/edit/{edit_id}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Success', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_changelog(self, **kwargs): # noqa: E501
- """get_changelog # noqa: E501
-
- Returns a list of the most recent changelog entries accepted (merged) into the catalog. List is sorted by changelog index in descending order. Note that the accepted timestamp roughly corresponds to order, but not strictly; there exist out-of-order timestamps on the order of several seconds. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. There are millions of entries; to paginate through all of them, use this method to discover the highest existing entry number, then request the entries using `get_changelog_entry` one at a time. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_changelog(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param int limit: Maximum count of changelog entries to return in response
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[ChangelogEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_changelog_with_http_info(**kwargs) # noqa: E501
-
- def get_changelog_with_http_info(self, **kwargs): # noqa: E501
- """get_changelog # noqa: E501
-
- Returns a list of the most recent changelog entries accepted (merged) into the catalog. List is sorted by changelog index in descending order. Note that the accepted timestamp roughly corresponds to order, but not strictly; there exist out-of-order timestamps on the order of several seconds. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. There are millions of entries; to paginate through all of them, use this method to discover the highest existing entry number, then request the entries using `get_changelog_entry` one at a time. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_changelog_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param int limit: Maximum count of changelog entries to return in response
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[ChangelogEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_changelog" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/changelog', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[ChangelogEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_changelog_entry(self, index, **kwargs): # noqa: E501
- """get_changelog_entry # noqa: E501
-
- Returns a single changelog entry. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_changelog_entry(index, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param int index: Changelog index of entry to return (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ChangelogEntry
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_changelog_entry_with_http_info(index, **kwargs) # noqa: E501
-
- def get_changelog_entry_with_http_info(self, index, **kwargs): # noqa: E501
- """get_changelog_entry # noqa: E501
-
- Returns a single changelog entry. As a known database issue, it is technically possible for there to be a gap in changelog index numbers (aka, a missing changelog entry). There are no currently known gaps and this is considered a bug that will be addressed. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_changelog_entry_with_http_info(index, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param int index: Changelog index of entry to return (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ChangelogEntry, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['index'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_changelog_entry" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'index' is set
- if ('index' not in local_var_params or
- local_var_params['index'] is None):
- raise ApiValueError("Missing the required parameter `index` when calling `get_changelog_entry`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'index' in local_var_params:
- path_params['index'] = local_var_params['index'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/changelog/{index}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ChangelogEntry', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_container(self, ident, **kwargs): # noqa: E501
- """get_container # noqa: E501
-
- Fetches a single container entity from the catalog. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For containers, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For containers, none accepted (yet).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ContainerEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_container_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_container_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_container # noqa: E501
-
- Fetches a single container entity from the catalog. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For containers, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For containers, none accepted (yet).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ContainerEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_container" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_container`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ContainerEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_container_edit(self, edit_id, **kwargs): # noqa: E501
- """get_container_edit # noqa: E501
-
- Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_container_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_container_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_container_edit # noqa: E501
-
- Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_container_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_container_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_container_history(self, ident, **kwargs): # noqa: E501
- """get_container_history # noqa: E501
-
- Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit: Maximum number of changelog entries to return
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_container_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_container_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_container_history # noqa: E501
-
- Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit: Maximum number of changelog entries to return
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_container_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_container_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_container_redirects(self, ident, **kwargs): # noqa: E501
- """get_container_redirects # noqa: E501
-
- Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_container_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_container_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_container_redirects # noqa: E501
-
- Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_container_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_container_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_container_revision(self, rev_id, **kwargs): # noqa: E501
- """get_container_revision # noqa: E501
-
- Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_container`.
- :param str hide: List of entity fields to elide in response. See `get_container`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ContainerEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_container_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_container_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_container_revision # noqa: E501
-
- Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_container_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_container`.
- :param str hide: List of entity fields to elide in response. See `get_container`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ContainerEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_container_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_container_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ContainerEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator(self, ident, **kwargs): # noqa: E501
- """get_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For creators, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For creators, none accepted (yet).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: CreatorEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_creator_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For creators, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For creators, none accepted (yet).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(CreatorEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_creator`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CreatorEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator_edit(self, edit_id, **kwargs): # noqa: E501
- """get_creator_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_creator_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_creator_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_creator_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator_history(self, ident, **kwargs): # noqa: E501
- """get_creator_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_creator_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_creator_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_creator_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator_redirects(self, ident, **kwargs): # noqa: E501
- """get_creator_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_creator_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_creator_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_creator_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator_releases(self, ident, **kwargs): # noqa: E501
- """get_creator_releases # noqa: E501
-
- Returns the set of Release entities having a `contrib` entry pointing to the creator entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_releases(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[ReleaseEntity]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_releases_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_creator_releases_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_creator_releases # noqa: E501
-
- Returns the set of Release entities having a `contrib` entry pointing to the creator entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_releases_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[ReleaseEntity], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator_releases" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_creator_releases`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/{ident}/releases', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[ReleaseEntity]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_creator_revision(self, rev_id, **kwargs): # noqa: E501
- """get_creator_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_creator`, though note that identifier-based expansions (like `releases`) will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_creator`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: CreatorEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_creator_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_creator_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_creator_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_creator_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_creator`, though note that identifier-based expansions (like `releases`) will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_creator`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(CreatorEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_creator_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_creator_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CreatorEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editgroup(self, editgroup_id, **kwargs): # noqa: E501
- """get_editgroup # noqa: E501
-
- Returns a single editgroup object. Unlike some similar methods, this method will return a full/expanded editgroup object, which includes edit lists of each entity type (though will not include the complete entity objects). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroup(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501
-
- def get_editgroup_with_http_info(self, editgroup_id, **kwargs): # noqa: E501
- """get_editgroup # noqa: E501
-
- Returns a single editgroup object. Unlike some similar methods, this method will return a full/expanded editgroup object, which includes edit lists of each entity type (though will not include the complete entity objects). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroup_with_http_info(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editgroup" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `get_editgroup`") # noqa: E501
-
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup`, length must be less than or equal to `26`") # noqa: E501
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup`, length must be greater than or equal to `26`") # noqa: E501
- if 'editgroup_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editgroup_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editgroup_annotations(self, editgroup_id, **kwargs): # noqa: E501
- """get_editgroup_annotations # noqa: E501
-
- Returns a list of annotations made to a specific editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroup_annotations(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param str expand: List of sub-entities to expand in response. For editgroup annotations: 'editors'
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EditgroupAnnotation]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editgroup_annotations_with_http_info(editgroup_id, **kwargs) # noqa: E501
-
- def get_editgroup_annotations_with_http_info(self, editgroup_id, **kwargs): # noqa: E501
- """get_editgroup_annotations # noqa: E501
-
- Returns a list of annotations made to a specific editgroup. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroup_annotations_with_http_info(editgroup_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param str expand: List of sub-entities to expand in response. For editgroup annotations: 'editors'
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EditgroupAnnotation], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'expand'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editgroup_annotations" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `get_editgroup_annotations`") # noqa: E501
-
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup_annotations`, length must be less than or equal to `26`") # noqa: E501
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup_annotations`, length must be greater than or equal to `26`") # noqa: E501
- if 'editgroup_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editgroup_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup_annotations`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/annotations', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EditgroupAnnotation]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editgroups_reviewable(self, **kwargs): # noqa: E501
- """get_editgroups_reviewable # noqa: E501
-
- Returns a set of editgroups which have been submitted but not yet accepted. Query parameters can be used to sort and paginate the list returned. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroups_reviewable(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str expand: List of sub-entities to expand in response. For editgroups: 'editors'
- :param int limit: Maximum number of reviewable editgroups to return in response
- :param datetime before: Return only reviewable editgroups submitted *before* the given timestamp (not inclusive). Editgroups will be sorted by submission time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only reviewable editgroups submitted *after* the given timestamp (not inclusive). Editgroups will be sorted by submission time in ascending order (most recent last). For use in pagination.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[Editgroup]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editgroups_reviewable_with_http_info(**kwargs) # noqa: E501
-
- def get_editgroups_reviewable_with_http_info(self, **kwargs): # noqa: E501
- """get_editgroups_reviewable # noqa: E501
-
- Returns a set of editgroups which have been submitted but not yet accepted. Query parameters can be used to sort and paginate the list returned. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editgroups_reviewable_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str expand: List of sub-entities to expand in response. For editgroups: 'editors'
- :param int limit: Maximum number of reviewable editgroups to return in response
- :param datetime before: Return only reviewable editgroups submitted *before* the given timestamp (not inclusive). Editgroups will be sorted by submission time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only reviewable editgroups submitted *after* the given timestamp (not inclusive). Editgroups will be sorted by submission time in ascending order (most recent last). For use in pagination.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[Editgroup], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['expand', 'limit', 'before', 'since'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editgroups_reviewable" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'before' in local_var_params:
- query_params.append(('before', local_var_params['before'])) # noqa: E501
- if 'since' in local_var_params:
- query_params.append(('since', local_var_params['since'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/reviewable', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[Editgroup]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editor(self, editor_id, **kwargs): # noqa: E501
- """get_editor # noqa: E501
-
- Returns an editor object, including metadata such as the username, type, and role of editor. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editor
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editor_with_http_info(editor_id, **kwargs) # noqa: E501
-
- def get_editor_with_http_info(self, editor_id, **kwargs): # noqa: E501
- """get_editor # noqa: E501
-
- Returns an editor object, including metadata such as the username, type, and role of editor. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor_with_http_info(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editor, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editor_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editor" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editor_id' is set
- if ('editor_id' not in local_var_params or
- local_var_params['editor_id'] is None):
- raise ApiValueError("Missing the required parameter `editor_id` when calling `get_editor`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editor_id' in local_var_params:
- path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editor/{editor_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editor', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editor_annotations(self, editor_id, **kwargs): # noqa: E501
- """get_editor_annotations # noqa: E501
-
- Fetches a list of annotations made by a particular editor. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor_annotations(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: base32-encoded unique identifier (required)
- :param int limit: Maximum number (count) of annotations to return in response
- :param datetime before: Return only annotations made *before* the given timestamp (not inclusive). Annotations will be sorted by creation time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only annotations made *after* the given timestamp (not inclusive). Annotations will be sorted by creation time in ascending order (most recent last). For use in pagination.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EditgroupAnnotation]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editor_annotations_with_http_info(editor_id, **kwargs) # noqa: E501
-
- def get_editor_annotations_with_http_info(self, editor_id, **kwargs): # noqa: E501
- """get_editor_annotations # noqa: E501
-
- Fetches a list of annotations made by a particular editor. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor_annotations_with_http_info(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: base32-encoded unique identifier (required)
- :param int limit: Maximum number (count) of annotations to return in response
- :param datetime before: Return only annotations made *before* the given timestamp (not inclusive). Annotations will be sorted by creation time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only annotations made *after* the given timestamp (not inclusive). Annotations will be sorted by creation time in ascending order (most recent last). For use in pagination.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EditgroupAnnotation], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editor_id', 'limit', 'before', 'since'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editor_annotations" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editor_id' is set
- if ('editor_id' not in local_var_params or
- local_var_params['editor_id'] is None):
- raise ApiValueError("Missing the required parameter `editor_id` when calling `get_editor_annotations`") # noqa: E501
-
- if ('editor_id' in local_var_params and
- len(local_var_params['editor_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editor_id` when calling `get_editor_annotations`, length must be less than or equal to `26`") # noqa: E501
- if ('editor_id' in local_var_params and
- len(local_var_params['editor_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editor_id` when calling `get_editor_annotations`, length must be greater than or equal to `26`") # noqa: E501
- if 'editor_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editor_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editor_id` when calling `get_editor_annotations`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editor_id' in local_var_params:
- path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'before' in local_var_params:
- query_params.append(('before', local_var_params['before'])) # noqa: E501
- if 'since' in local_var_params:
- query_params.append(('since', local_var_params['since'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editor/{editor_id}/annotations', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EditgroupAnnotation]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_editor_editgroups(self, editor_id, **kwargs): # noqa: E501
- """get_editor_editgroups # noqa: E501
-
- Returns a set of editgroups created by the given editor, regardless of the status (accepted/submitted) of the editgroups. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor_editgroups(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param int limit:
- :param datetime before: Return only editgroups created *before* the given timestamp (not inclusive). Editgroups will be sorted by creation time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only editgroups created *after* the given timestamp (not inclusive). Editgroups will be sorted by creation time in ascending order (most recent last). For use in pagination.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[Editgroup]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_editor_editgroups_with_http_info(editor_id, **kwargs) # noqa: E501
-
- def get_editor_editgroups_with_http_info(self, editor_id, **kwargs): # noqa: E501
- """get_editor_editgroups # noqa: E501
-
- Returns a set of editgroups created by the given editor, regardless of the status (accepted/submitted) of the editgroups. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_editor_editgroups_with_http_info(editor_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param int limit:
- :param datetime before: Return only editgroups created *before* the given timestamp (not inclusive). Editgroups will be sorted by creation time in descending order (most recent first). For use in pagination.
- :param datetime since: Return only editgroups created *after* the given timestamp (not inclusive). Editgroups will be sorted by creation time in ascending order (most recent last). For use in pagination.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[Editgroup], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editor_id', 'limit', 'before', 'since'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_editor_editgroups" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editor_id' is set
- if ('editor_id' not in local_var_params or
- local_var_params['editor_id'] is None):
- raise ApiValueError("Missing the required parameter `editor_id` when calling `get_editor_editgroups`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editor_id' in local_var_params:
- path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'before' in local_var_params:
- query_params.append(('before', local_var_params['before'])) # noqa: E501
- if 'since' in local_var_params:
- query_params.append(('since', local_var_params['since'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editor/{editor_id}/editgroups', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[Editgroup]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_file(self, ident, **kwargs): # noqa: E501
- """get_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For files, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For files, none accepted (yet).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: FileEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_file_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_file_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For files, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For files, none accepted (yet).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(FileEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_file" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_file`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='FileEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_file_edit(self, edit_id, **kwargs): # noqa: E501
- """get_file_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_file_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_file_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_file_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_file_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_file_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_file_history(self, ident, **kwargs): # noqa: E501
- """get_file_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_file_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_file_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_file_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_file_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_file_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_file_redirects(self, ident, **kwargs): # noqa: E501
- """get_file_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_file_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_file_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_file_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_file_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_file_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_file_revision(self, rev_id, **kwargs): # noqa: E501
- """get_file_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_file`.
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: FileEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_file_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_file_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_file_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_file_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_file`.
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(FileEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_file_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_file_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='FileEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_fileset(self, ident, **kwargs): # noqa: E501
- """get_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For filesets, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: FilesetEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_fileset_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_fileset_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For filesets, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(FilesetEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fileset" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_fileset`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/fileset/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='FilesetEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_fileset_edit(self, edit_id, **kwargs): # noqa: E501
- """get_fileset_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_fileset_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_fileset_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_fileset_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fileset_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_fileset_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/fileset/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_fileset_history(self, ident, **kwargs): # noqa: E501
- """get_fileset_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_fileset_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_fileset_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_fileset_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fileset_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_fileset_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/fileset/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_fileset_redirects(self, ident, **kwargs): # noqa: E501
- """get_fileset_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_fileset_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_fileset_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_fileset_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fileset_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_fileset_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/fileset/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_fileset_revision(self, rev_id, **kwargs): # noqa: E501
- """get_fileset_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_fileset`.
- :param str hide: List of entity fields to elide in response. See `get_fileset`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: FilesetEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_fileset_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_fileset_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_fileset_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fileset_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_fileset`.
- :param str hide: List of entity fields to elide in response. See `get_fileset`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(FilesetEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fileset_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_fileset_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/fileset/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='FilesetEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release(self, ident, **kwargs): # noqa: E501
- """get_release # noqa: E501
-
- Fetches a single Release entity from the catalog. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For releases, 'files', 'filesets, 'webcaptures', 'container', and 'creators' are valid.
- :param str hide: List of entity fields to elide in response (for efficiency). For releases, 'abstracts', 'refs', and 'contribs' are valid.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ReleaseEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release # noqa: E501
-
- Fetches a single Release entity from the catalog. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For releases, 'files', 'filesets, 'webcaptures', 'container', and 'creators' are valid.
- :param str hide: List of entity fields to elide in response (for efficiency). For releases, 'abstracts', 'refs', and 'contribs' are valid.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ReleaseEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ReleaseEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_edit(self, edit_id, **kwargs): # noqa: E501
- """get_release_edit # noqa: E501
-
- Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_release_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_release_edit # noqa: E501
-
- Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_release_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_files(self, ident, **kwargs): # noqa: E501
- """get_release_files # noqa: E501
-
- Returns the set of File entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_files(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[FileEntity]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_files_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_files_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release_files # noqa: E501
-
- Returns the set of File entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_files_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[FileEntity], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_files" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release_files`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}/files', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[FileEntity]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_filesets(self, ident, **kwargs): # noqa: E501
- """get_release_filesets # noqa: E501
-
- Returns the set of Fileset entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_filesets(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_fileset`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[FilesetEntity]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_filesets_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_filesets_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release_filesets # noqa: E501
-
- Returns the set of Fileset entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_filesets_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_fileset`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[FilesetEntity], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_filesets" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release_filesets`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}/filesets', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[FilesetEntity]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_history(self, ident, **kwargs): # noqa: E501
- """get_release_history # noqa: E501
-
- Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release_history # noqa: E501
-
- Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_redirects(self, ident, **kwargs): # noqa: E501
- """get_release_redirects # noqa: E501
-
- Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release_redirects # noqa: E501
-
- Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_revision(self, rev_id, **kwargs): # noqa: E501
- """get_release_revision # noqa: E501
-
- Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_release`, though note that identifier-based exapansions like `file` will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ReleaseEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_release_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_release_revision # noqa: E501
-
- Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_release`, though note that identifier-based exapansions like `file` will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ReleaseEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_release_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ReleaseEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_release_webcaptures(self, ident, **kwargs): # noqa: E501
- """get_release_webcaptures # noqa: E501
-
- Returns the set of Web Capture entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_webcaptures(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_webcapture`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[WebcaptureEntity]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_release_webcaptures_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_release_webcaptures_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_release_webcaptures # noqa: E501
-
- Returns the set of Web Capture entities that have a `release_id` pointing to this release entity. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_release_webcaptures_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_webcapture`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[WebcaptureEntity], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_release_webcaptures" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_release_webcaptures`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/{ident}/webcaptures', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[WebcaptureEntity]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_webcapture(self, ident, **kwargs): # noqa: E501
- """get_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For webcaptures, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: WebcaptureEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_webcapture_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_webcapture_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For webcaptures, `releases` is accepted.
- :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(WebcaptureEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_webcapture" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_webcapture`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/webcapture/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='WebcaptureEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_webcapture_edit(self, edit_id, **kwargs): # noqa: E501
- """get_webcapture_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_webcapture_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_webcapture_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_webcapture_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_webcapture_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_webcapture_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/webcapture/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_webcapture_history(self, ident, **kwargs): # noqa: E501
- """get_webcapture_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_webcapture_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_webcapture_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_webcapture_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_webcapture_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_webcapture_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/webcapture/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_webcapture_redirects(self, ident, **kwargs): # noqa: E501
- """get_webcapture_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_webcapture_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_webcapture_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_webcapture_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_webcapture_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_webcapture_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/webcapture/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_webcapture_revision(self, rev_id, **kwargs): # noqa: E501
- """get_webcapture_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_webcapture`.
- :param str hide: List of entity fields to elide in response. See `get_webcapture`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: WebcaptureEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_webcapture_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_webcapture_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_webcapture_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_webcapture_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_webcapture`.
- :param str hide: List of entity fields to elide in response. See `get_webcapture`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(WebcaptureEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_webcapture_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_webcapture_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/webcapture/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='WebcaptureEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work(self, ident, **kwargs): # noqa: E501
- """get_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For works, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For works, none accepted (yet).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: WorkEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_work_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str expand: List of sub-entities to expand in response. For works, none accepted (yet).
- :param str hide: List of entity fields to elide in response. For works, none accepted (yet).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(WorkEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_work`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/{ident}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='WorkEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work_edit(self, edit_id, **kwargs): # noqa: E501
- """get_work_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_edit(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_edit_with_http_info(edit_id, **kwargs) # noqa: E501
-
- def get_work_edit_with_http_info(self, edit_id, **kwargs): # noqa: E501
- """get_work_edit # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_edit_with_http_info(edit_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['edit_id'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work_edit" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'edit_id' is set
- if ('edit_id' not in local_var_params or
- local_var_params['edit_id'] is None):
- raise ApiValueError("Missing the required parameter `edit_id` when calling `get_work_edit`") # noqa: E501
-
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) > 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, length must be less than or equal to `36`") # noqa: E501
- if ('edit_id' in local_var_params and
- len(local_var_params['edit_id']) < 36):
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, length must be greater than or equal to `36`") # noqa: E501
- if 'edit_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['edit_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'edit_id' in local_var_params:
- path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/edit/{edit_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work_history(self, ident, **kwargs): # noqa: E501
- """get_work_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_history(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[EntityHistoryEntry]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_history_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_work_history_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_work_history # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_history_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param int limit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[EntityHistoryEntry], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'limit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work_history" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_work_history`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'limit' in local_var_params:
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/{ident}/history', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[EntityHistoryEntry]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work_redirects(self, ident, **kwargs): # noqa: E501
- """get_work_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_redirects(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[str]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_redirects_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_work_redirects_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_work_redirects # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_redirects_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work_redirects" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_work_redirects`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/{ident}/redirects', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[str]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work_releases(self, ident, **kwargs): # noqa: E501
- """get_work_releases # noqa: E501
-
- Returns the set of release entities that are part of this work (aka, have `work_id` pointing to this work entity). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_releases(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: list[ReleaseEntity]
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_releases_with_http_info(ident, **kwargs) # noqa: E501
-
- def get_work_releases_with_http_info(self, ident, **kwargs): # noqa: E501
- """get_work_releases # noqa: E501
-
- Returns the set of release entities that are part of this work (aka, have `work_id` pointing to this work entity). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_releases_with_http_info(ident, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str ident: (required)
- :param str hide: List of entity fields to elide in response. See `get_release`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(list[ReleaseEntity], status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['ident', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work_releases" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `get_work_releases`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/{ident}/releases', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='list[ReleaseEntity]', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def get_work_revision(self, rev_id, **kwargs): # noqa: E501
- """get_work_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_revision(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_work`, though note that identifier-based expansions like `releases` will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_work`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: WorkEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.get_work_revision_with_http_info(rev_id, **kwargs) # noqa: E501
-
- def get_work_revision_with_http_info(self, rev_id, **kwargs): # noqa: E501
- """get_work_revision # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_work_revision_with_http_info(rev_id, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required)
- :param str expand: List of sub-entities to expand in response. See `get_work`, though note that identifier-based expansions like `releases` will always be empty for revisions.
- :param str hide: List of entity fields to elide in response. See `get_work`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(WorkEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['rev_id', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_work_revision" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'rev_id' is set
- if ('rev_id' not in local_var_params or
- local_var_params['rev_id'] is None):
- raise ApiValueError("Missing the required parameter `rev_id` when calling `get_work_revision`") # noqa: E501
-
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) > 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, length must be less than or equal to `36`") # noqa: E501
- if ('rev_id' in local_var_params and
- len(local_var_params['rev_id']) < 36):
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, length must be greater than or equal to `36`") # noqa: E501
- if 'rev_id' in local_var_params and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', local_var_params['rev_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'rev_id' in local_var_params:
- path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501
-
- query_params = []
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/work/rev/{rev_id}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='WorkEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def lookup_container(self, **kwargs): # noqa: E501
- """lookup_container # noqa: E501
-
- Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_container(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str issnl: Linking ISSN (ISSN-L); will be one of either ISSN-E or ISSN-P
- :param str issne: Electronic ISSN (ISSN-L)
- :param str issnp: Print ISSN (ISSN-P)
- :param str issn: Any of ISSN-L, ISSN-E, or ISSN-P
- :param str wikidata_qid:
- :param str expand: List of sub-entities to expand in response. See `get_container`.
- :param str hide: List of entity fields to elide in response. See `get_container`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ContainerEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.lookup_container_with_http_info(**kwargs) # noqa: E501
-
- def lookup_container_with_http_info(self, **kwargs): # noqa: E501
- """lookup_container # noqa: E501
-
- Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_container_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str issnl: Linking ISSN (ISSN-L); will be one of either ISSN-E or ISSN-P
- :param str issne: Electronic ISSN (ISSN-L)
- :param str issnp: Print ISSN (ISSN-P)
- :param str issn: Any of ISSN-L, ISSN-E, or ISSN-P
- :param str wikidata_qid:
- :param str expand: List of sub-entities to expand in response. See `get_container`.
- :param str hide: List of entity fields to elide in response. See `get_container`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ContainerEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['issnl', 'issne', 'issnp', 'issn', 'wikidata_qid', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method lookup_container" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- if ('issnl' in local_var_params and
- len(local_var_params['issnl']) > 9):
- raise ApiValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
- if ('issnl' in local_var_params and
- len(local_var_params['issnl']) < 9):
- raise ApiValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
- if 'issnl' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issnl']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
- if ('issne' in local_var_params and
- len(local_var_params['issne']) > 9):
- raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
- if ('issne' in local_var_params and
- len(local_var_params['issne']) < 9):
- raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
- if 'issne' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issne']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `issne` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
- if ('issnp' in local_var_params and
- len(local_var_params['issnp']) > 9):
- raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
- if ('issnp' in local_var_params and
- len(local_var_params['issnp']) < 9):
- raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
- if 'issnp' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issnp']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `issnp` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
- if ('issn' in local_var_params and
- len(local_var_params['issn']) > 9):
- raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501
- if ('issn' in local_var_params and
- len(local_var_params['issn']) < 9):
- raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501
- if 'issn' in local_var_params and not re.search(r'\d{4}-\d{3}[0-9X]', local_var_params['issn']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `issn` when calling `lookup_container`, must conform to the pattern `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'issnl' in local_var_params:
- query_params.append(('issnl', local_var_params['issnl'])) # noqa: E501
- if 'issne' in local_var_params:
- query_params.append(('issne', local_var_params['issne'])) # noqa: E501
- if 'issnp' in local_var_params:
- query_params.append(('issnp', local_var_params['issnp'])) # noqa: E501
- if 'issn' in local_var_params:
- query_params.append(('issn', local_var_params['issn'])) # noqa: E501
- if 'wikidata_qid' in local_var_params:
- query_params.append(('wikidata_qid', local_var_params['wikidata_qid'])) # noqa: E501
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/container/lookup', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ContainerEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def lookup_creator(self, **kwargs): # noqa: E501
- """lookup_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_creator(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str orcid: ORCiD (https://orcid.org) identifier
- :param str wikidata_qid:
- :param str expand: List of sub-entities to expand in response. See `get_creator`.
- :param str hide: List of entity fields to elide in response. See `get_creator`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: CreatorEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.lookup_creator_with_http_info(**kwargs) # noqa: E501
-
- def lookup_creator_with_http_info(self, **kwargs): # noqa: E501
- """lookup_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_creator_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str orcid: ORCiD (https://orcid.org) identifier
- :param str wikidata_qid:
- :param str expand: List of sub-entities to expand in response. See `get_creator`.
- :param str hide: List of entity fields to elide in response. See `get_creator`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(CreatorEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['orcid', 'wikidata_qid', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method lookup_creator" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- if ('orcid' in local_var_params and
- len(local_var_params['orcid']) > 19):
- raise ApiValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be less than or equal to `19`") # noqa: E501
- if ('orcid' in local_var_params and
- len(local_var_params['orcid']) < 19):
- raise ApiValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501
- if 'orcid' in local_var_params and not re.search(r'\d{4}-\d{4}-\d{4}-\d{3}[\dX]', local_var_params['orcid']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\d{4}-\d{4}-\d{4}-\d{3}[\dX]/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'orcid' in local_var_params:
- query_params.append(('orcid', local_var_params['orcid'])) # noqa: E501
- if 'wikidata_qid' in local_var_params:
- query_params.append(('wikidata_qid', local_var_params['wikidata_qid'])) # noqa: E501
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/creator/lookup', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='CreatorEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def lookup_editor(self, **kwargs): # noqa: E501
- """lookup_editor # noqa: E501
-
- Fetches editor by, eg, username. One (and only one) lookup identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_editor(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str username:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editor
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.lookup_editor_with_http_info(**kwargs) # noqa: E501
-
- def lookup_editor_with_http_info(self, **kwargs): # noqa: E501
- """lookup_editor # noqa: E501
-
- Fetches editor by, eg, username. One (and only one) lookup identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_editor_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str username:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editor, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['username'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method lookup_editor" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'username' in local_var_params:
- query_params.append(('username', local_var_params['username'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/editor/lookup', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editor', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def lookup_file(self, **kwargs): # noqa: E501
- """lookup_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_file(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str md5: MD5 hash of data, in hex encoding
- :param str sha1: SHA-1 hash of data, in hex encoding
- :param str sha256: SHA-256 hash of data, in hex encoding
- :param str expand: List of sub-entities to expand in response. See `get_file`.
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: FileEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.lookup_file_with_http_info(**kwargs) # noqa: E501
-
- def lookup_file_with_http_info(self, **kwargs): # noqa: E501
- """lookup_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_file_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str md5: MD5 hash of data, in hex encoding
- :param str sha1: SHA-1 hash of data, in hex encoding
- :param str sha256: SHA-256 hash of data, in hex encoding
- :param str expand: List of sub-entities to expand in response. See `get_file`.
- :param str hide: List of entity fields to elide in response. See `get_file`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(FileEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['md5', 'sha1', 'sha256', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method lookup_file" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- if ('md5' in local_var_params and
- len(local_var_params['md5']) > 32):
- raise ApiValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be less than or equal to `32`") # noqa: E501
- if ('md5' in local_var_params and
- len(local_var_params['md5']) < 32):
- raise ApiValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be greater than or equal to `32`") # noqa: E501
- if 'md5' in local_var_params and not re.search(r'[a-f0-9]{32}', local_var_params['md5']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `md5` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{32}/`") # noqa: E501
- if ('sha1' in local_var_params and
- len(local_var_params['sha1']) > 40):
- raise ApiValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be less than or equal to `40`") # noqa: E501
- if ('sha1' in local_var_params and
- len(local_var_params['sha1']) < 40):
- raise ApiValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be greater than or equal to `40`") # noqa: E501
- if 'sha1' in local_var_params and not re.search(r'[a-f0-9]{40}', local_var_params['sha1']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `sha1` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{40}/`") # noqa: E501
- if ('sha256' in local_var_params and
- len(local_var_params['sha256']) > 64):
- raise ApiValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be less than or equal to `64`") # noqa: E501
- if ('sha256' in local_var_params and
- len(local_var_params['sha256']) < 64):
- raise ApiValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be greater than or equal to `64`") # noqa: E501
- if 'sha256' in local_var_params and not re.search(r'[a-f0-9]{64}', local_var_params['sha256']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `sha256` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{64}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'md5' in local_var_params:
- query_params.append(('md5', local_var_params['md5'])) # noqa: E501
- if 'sha1' in local_var_params:
- query_params.append(('sha1', local_var_params['sha1'])) # noqa: E501
- if 'sha256' in local_var_params:
- query_params.append(('sha256', local_var_params['sha256'])) # noqa: E501
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/file/lookup', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='FileEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def lookup_release(self, **kwargs): # noqa: E501
- """lookup_release # noqa: E501
-
- Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_release(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str doi:
- :param str wikidata_qid:
- :param str isbn13:
- :param str pmid:
- :param str pmcid:
- :param str core:
- :param str arxiv:
- :param str jstor:
- :param str ark:
- :param str mag:
- :param str doaj:
- :param str dblp:
- :param str oai:
- :param str hdl:
- :param str expand: List of sub-entities to expand in response. See `get_release`.
- :param str hide: List of sub-entities to elide in response. See `get_release`.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: ReleaseEntity
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.lookup_release_with_http_info(**kwargs) # noqa: E501
-
- def lookup_release_with_http_info(self, **kwargs): # noqa: E501
- """lookup_release # noqa: E501
-
- Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.lookup_release_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str doi:
- :param str wikidata_qid:
- :param str isbn13:
- :param str pmid:
- :param str pmcid:
- :param str core:
- :param str arxiv:
- :param str jstor:
- :param str ark:
- :param str mag:
- :param str doaj:
- :param str dblp:
- :param str oai:
- :param str hdl:
- :param str expand: List of sub-entities to expand in response. See `get_release`.
- :param str hide: List of sub-entities to elide in response. See `get_release`.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(ReleaseEntity, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['doi', 'wikidata_qid', 'isbn13', 'pmid', 'pmcid', 'core', 'arxiv', 'jstor', 'ark', 'mag', 'doaj', 'dblp', 'oai', 'hdl', 'expand', 'hide'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method lookup_release" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'doi' in local_var_params:
- query_params.append(('doi', local_var_params['doi'])) # noqa: E501
- if 'wikidata_qid' in local_var_params:
- query_params.append(('wikidata_qid', local_var_params['wikidata_qid'])) # noqa: E501
- if 'isbn13' in local_var_params:
- query_params.append(('isbn13', local_var_params['isbn13'])) # noqa: E501
- if 'pmid' in local_var_params:
- query_params.append(('pmid', local_var_params['pmid'])) # noqa: E501
- if 'pmcid' in local_var_params:
- query_params.append(('pmcid', local_var_params['pmcid'])) # noqa: E501
- if 'core' in local_var_params:
- query_params.append(('core', local_var_params['core'])) # noqa: E501
- if 'arxiv' in local_var_params:
- query_params.append(('arxiv', local_var_params['arxiv'])) # noqa: E501
- if 'jstor' in local_var_params:
- query_params.append(('jstor', local_var_params['jstor'])) # noqa: E501
- if 'ark' in local_var_params:
- query_params.append(('ark', local_var_params['ark'])) # noqa: E501
- if 'mag' in local_var_params:
- query_params.append(('mag', local_var_params['mag'])) # noqa: E501
- if 'doaj' in local_var_params:
- query_params.append(('doaj', local_var_params['doaj'])) # noqa: E501
- if 'dblp' in local_var_params:
- query_params.append(('dblp', local_var_params['dblp'])) # noqa: E501
- if 'oai' in local_var_params:
- query_params.append(('oai', local_var_params['oai'])) # noqa: E501
- if 'hdl' in local_var_params:
- query_params.append(('hdl', local_var_params['hdl'])) # noqa: E501
- if 'expand' in local_var_params:
- query_params.append(('expand', local_var_params['expand'])) # noqa: E501
- if 'hide' in local_var_params:
- query_params.append(('hide', local_var_params['hide'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- '/release/lookup', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='ReleaseEntity', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_container(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_container # noqa: E501
-
- Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the request must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_container(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param ContainerEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_container_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_container_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_container # noqa: E501
-
- Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the request must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_container_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param ContainerEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_container" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_container`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_container`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_container`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/container/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_creator(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_creator(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param CreatorEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_creator_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_creator_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_creator # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_creator_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param CreatorEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_creator" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_creator`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_creator`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_creator`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/creator/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_editgroup(self, editgroup_id, editgroup, **kwargs): # noqa: E501
- """update_editgroup # noqa: E501
-
- Updates metadata for a single editgroup object. Note that only metadata fields such as the `description` or `extra` metadata can be changed with this method; it does not allow adding or removing edits to the editgroup (for that use the individual entity create/update/delete methods). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_editgroup(editgroup_id, editgroup, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param Editgroup editgroup: (required)
- :param bool submit:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editgroup
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_editgroup_with_http_info(editgroup_id, editgroup, **kwargs) # noqa: E501
-
- def update_editgroup_with_http_info(self, editgroup_id, editgroup, **kwargs): # noqa: E501
- """update_editgroup # noqa: E501
-
- Updates metadata for a single editgroup object. Note that only metadata fields such as the `description` or `extra` metadata can be changed with this method; it does not allow adding or removing edits to the editgroup (for that use the individual entity create/update/delete methods). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_editgroup_with_http_info(editgroup_id, editgroup, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: base32-encoded unique identifier (required)
- :param Editgroup editgroup: (required)
- :param bool submit:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editgroup, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'editgroup', 'submit'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_editgroup" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_editgroup`") # noqa: E501
- # verify the required parameter 'editgroup' is set
- if ('editgroup' not in local_var_params or
- local_var_params['editgroup'] is None):
- raise ApiValueError("Missing the required parameter `editgroup` when calling `update_editgroup`") # noqa: E501
-
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) > 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `update_editgroup`, length must be less than or equal to `26`") # noqa: E501
- if ('editgroup_id' in local_var_params and
- len(local_var_params['editgroup_id']) < 26):
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `update_editgroup`, length must be greater than or equal to `26`") # noqa: E501
- if 'editgroup_id' in local_var_params and not re.search(r'[a-zA-Z2-7]{26}', local_var_params['editgroup_id']): # noqa: E501
- raise ApiValueError("Invalid value for parameter `editgroup_id` when calling `update_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
-
- query_params = []
- if 'submit' in local_var_params:
- query_params.append(('submit', local_var_params['submit'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'editgroup' in local_var_params:
- body_params = local_var_params['editgroup']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editgroup', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_editor(self, editor_id, editor, **kwargs): # noqa: E501
- """update_editor # noqa: E501
-
- Allows metadata changes to some editor fields, such as the username. Changes require authentication and permissions. An editor can change their own username; changes to role flags require the `admin` role by the editor making the request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_editor(editor_id, editor, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param Editor editor: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Editor
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_editor_with_http_info(editor_id, editor, **kwargs) # noqa: E501
-
- def update_editor_with_http_info(self, editor_id, editor, **kwargs): # noqa: E501
- """update_editor # noqa: E501
-
- Allows metadata changes to some editor fields, such as the username. Changes require authentication and permissions. An editor can change their own username; changes to role flags require the `admin` role by the editor making the request. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_editor_with_http_info(editor_id, editor, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editor_id: (required)
- :param Editor editor: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(Editor, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editor_id', 'editor'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_editor" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editor_id' is set
- if ('editor_id' not in local_var_params or
- local_var_params['editor_id'] is None):
- raise ApiValueError("Missing the required parameter `editor_id` when calling `update_editor`") # noqa: E501
- # verify the required parameter 'editor' is set
- if ('editor' not in local_var_params or
- local_var_params['editor'] is None):
- raise ApiValueError("Missing the required parameter `editor` when calling `update_editor`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editor_id' in local_var_params:
- path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'editor' in local_var_params:
- body_params = local_var_params['editor']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editor/{editor_id}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='Editor', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_file(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_file(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param FileEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_file_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_file_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_file # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_file_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param FileEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_file" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_file`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_file`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_file`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/file/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_fileset(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_fileset(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param FilesetEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_fileset_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_fileset_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_fileset # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_fileset_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param FilesetEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_fileset" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_fileset`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_fileset`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_fileset`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/fileset/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_release(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_release # noqa: E501
-
- Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the requiest must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_release(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param ReleaseEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_release_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_release_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_release # noqa: E501
-
- Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the requiest must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_release_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param ReleaseEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_release" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_release`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_release`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_release`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/release/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_webcapture(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_webcapture(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param WebcaptureEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_webcapture_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_webcapture_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_webcapture # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_webcapture_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param WebcaptureEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_webcapture" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_webcapture`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_webcapture`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_webcapture`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/webcapture/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def update_work(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_work(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param WorkEntity entity: (required)
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: EntityEdit
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.update_work_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501
-
- def update_work_with_http_info(self, editgroup_id, ident, entity, **kwargs): # noqa: E501
- """update_work # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.update_work_with_http_info(editgroup_id, ident, entity, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool: execute request asynchronously
- :param str editgroup_id: (required)
- :param str ident: (required)
- :param WorkEntity entity: (required)
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(EntityEdit, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ['editgroup_id', 'ident', 'entity'] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method update_work" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'editgroup_id' is set
- if ('editgroup_id' not in local_var_params or
- local_var_params['editgroup_id'] is None):
- raise ApiValueError("Missing the required parameter `editgroup_id` when calling `update_work`") # noqa: E501
- # verify the required parameter 'ident' is set
- if ('ident' not in local_var_params or
- local_var_params['ident'] is None):
- raise ApiValueError("Missing the required parameter `ident` when calling `update_work`") # noqa: E501
- # verify the required parameter 'entity' is set
- if ('entity' not in local_var_params or
- local_var_params['entity'] is None):
- raise ApiValueError("Missing the required parameter `entity` when calling `update_work`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if 'editgroup_id' in local_var_params:
- path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501
- if 'ident' in local_var_params:
- path_params['ident'] = local_var_params['ident'] # noqa: E501
-
- query_params = []
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'entity' in local_var_params:
- body_params = local_var_params['entity']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['Bearer'] # noqa: E501
-
- return self.api_client.call_api(
- '/editgroup/{editgroup_id}/work/{ident}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='EntityEdit', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
diff --git a/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py b/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py
new file mode 100644
index 00000000..b4da4300
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/editgroups_api.py
@@ -0,0 +1,1046 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.success import Success
+
+
+class EditgroupsApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.accept_editgroup_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/accept',
+ 'operation_id': 'accept_editgroup',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editgroup_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.create_editgroup_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup',
+ 'operation_id': 'create_editgroup',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup',
+ ],
+ 'required': [
+ 'editgroup',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup':
+ (Editgroup,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'editgroup': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_editgroup_annotation_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EditgroupAnnotation,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/annotation',
+ 'operation_id': 'create_editgroup_annotation',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'annotation',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'annotation',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editgroup_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'annotation':
+ (EditgroupAnnotation,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'annotation': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.get_editgroup_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [],
+ 'endpoint_path': '/editgroup/{editgroup_id}',
+ 'operation_id': 'get_editgroup',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editgroup_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_editgroup_annotations_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EditgroupAnnotation],),
+ 'auth': [],
+ 'endpoint_path': '/editgroup/{editgroup_id}/annotations',
+ 'operation_id': 'get_editgroup_annotations',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'expand',
+ ],
+ 'required': [
+ 'editgroup_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editgroup_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'expand':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'expand': 'expand',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'expand': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_editgroups_reviewable_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([Editgroup],),
+ 'auth': [],
+ 'endpoint_path': '/editgroup/reviewable',
+ 'operation_id': 'get_editgroups_reviewable',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'expand',
+ 'limit',
+ 'before',
+ 'since',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'expand':
+ (str,),
+ 'limit':
+ (int,),
+ 'before':
+ (datetime,),
+ 'since':
+ (datetime,),
+ },
+ 'attribute_map': {
+ 'expand': 'expand',
+ 'limit': 'limit',
+ 'before': 'before',
+ 'since': 'since',
+ },
+ 'location_map': {
+ 'expand': 'query',
+ 'limit': 'query',
+ 'before': 'query',
+ 'since': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_editgroup_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}',
+ 'operation_id': 'update_editgroup',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'editgroup',
+ 'submit',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'editgroup',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editgroup_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'editgroup':
+ (Editgroup,),
+ 'submit':
+ (bool,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'submit': 'submit',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'editgroup': 'body',
+ 'submit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def accept_editgroup(
+ self,
+ editgroup_id,
+ **kwargs
+ ):
+ """accept_editgroup # noqa: E501
+
+ Accept (\"merge\") the given editgroup into the catalog. The editgroup must be open (not already accepted), and the editor making this request must have the `admin` role. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.accept_editgroup(editgroup_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str): base32-encoded unique identifier
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ return self.accept_editgroup_endpoint.call_with_http_info(**kwargs)
+
+ def create_editgroup(
+ self,
+ editgroup,
+ **kwargs
+ ):
+ """create_editgroup # noqa: E501
+
+ Creates a new editgroup. By default the editor making this request will be the author of the editgroup. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_editgroup(editgroup, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup (Editgroup):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup'] = \
+ editgroup
+ return self.create_editgroup_endpoint.call_with_http_info(**kwargs)
+
+ def create_editgroup_annotation(
+ self,
+ editgroup_id,
+ annotation,
+ **kwargs
+ ):
+ """create_editgroup_annotation # noqa: E501
+
+ Submits a new annotation to the specified editgroup. The editgroup must be open (not already accepted). The annotation will automatically have authorship of the editor making this request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_editgroup_annotation(editgroup_id, annotation, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str): base32-encoded unique identifier
+ annotation (EditgroupAnnotation):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EditgroupAnnotation
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['annotation'] = \
+ annotation
+ return self.create_editgroup_annotation_endpoint.call_with_http_info(**kwargs)
+
+ def get_editgroup(
+ self,
+ editgroup_id,
+ **kwargs
+ ):
+ """get_editgroup # noqa: E501
+
+ Returns a single editgroup object. Unlike some similar methods, this method will return a full/expanded editgroup object, which includes edit lists of each entity type (though will not include the complete entity objects). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editgroup(editgroup_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str): base32-encoded unique identifier
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ return self.get_editgroup_endpoint.call_with_http_info(**kwargs)
+
+ def get_editgroup_annotations(
+ self,
+ editgroup_id,
+ **kwargs
+ ):
+ """get_editgroup_annotations # noqa: E501
+
+ Returns a list of annotations made to a specific editgroup. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editgroup_annotations(editgroup_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str): base32-encoded unique identifier
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For editgroup annotations: 'editors'. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EditgroupAnnotation]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ return self.get_editgroup_annotations_endpoint.call_with_http_info(**kwargs)
+
+ def get_editgroups_reviewable(
+ self,
+ **kwargs
+ ):
+ """get_editgroups_reviewable # noqa: E501
+
+ Returns a set of editgroups which have been submitted but not yet accepted. Query parameters can be used to sort and paginate the list returned. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editgroups_reviewable(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For editgroups: 'editors'. [optional]
+ limit (int): Maximum number of reviewable editgroups to return in response. [optional]
+ before (datetime): Return only reviewable editgroups submitted *before* the given timestamp (not inclusive). Editgroups will be sorted by submission time in descending order (most recent first). For use in pagination. . [optional]
+ since (datetime): Return only reviewable editgroups submitted *after* the given timestamp (not inclusive). Editgroups will be sorted by submission time in ascending order (most recent last). For use in pagination. . [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [Editgroup]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.get_editgroups_reviewable_endpoint.call_with_http_info(**kwargs)
+
+ def update_editgroup(
+ self,
+ editgroup_id,
+ editgroup,
+ **kwargs
+ ):
+ """update_editgroup # noqa: E501
+
+ Updates metadata for a single editgroup object. Note that only metadata fields such as the `description` or `extra` metadata can be changed with this method; it does not allow adding or removing edits to the editgroup (for that use the individual entity create/update/delete methods). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_editgroup(editgroup_id, editgroup, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str): base32-encoded unique identifier
+ editgroup (Editgroup):
+
+ Keyword Args:
+ submit (bool): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['editgroup'] = \
+ editgroup
+ return self.update_editgroup_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/editors_api.py b/python_openapi_client/fatcat_openapi_client/api/editors_api.py
new file mode 100644
index 00000000..00c99c93
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/editors_api.py
@@ -0,0 +1,750 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+from fatcat_openapi_client.model.editor import Editor
+from fatcat_openapi_client.model.error_response import ErrorResponse
+
+
+class EditorsApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.get_editor_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editor,),
+ 'auth': [],
+ 'endpoint_path': '/editor/{editor_id}',
+ 'operation_id': 'get_editor',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editor_id',
+ ],
+ 'required': [
+ 'editor_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editor_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editor_id': 'editor_id',
+ },
+ 'location_map': {
+ 'editor_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_editor_annotations_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EditgroupAnnotation],),
+ 'auth': [],
+ 'endpoint_path': '/editor/{editor_id}/annotations',
+ 'operation_id': 'get_editor_annotations',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editor_id',
+ 'limit',
+ 'before',
+ 'since',
+ ],
+ 'required': [
+ 'editor_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'editor_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('editor_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editor_id':
+ (str,),
+ 'limit':
+ (int,),
+ 'before':
+ (datetime,),
+ 'since':
+ (datetime,),
+ },
+ 'attribute_map': {
+ 'editor_id': 'editor_id',
+ 'limit': 'limit',
+ 'before': 'before',
+ 'since': 'since',
+ },
+ 'location_map': {
+ 'editor_id': 'path',
+ 'limit': 'query',
+ 'before': 'query',
+ 'since': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_editor_editgroups_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([Editgroup],),
+ 'auth': [],
+ 'endpoint_path': '/editor/{editor_id}/editgroups',
+ 'operation_id': 'get_editor_editgroups',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editor_id',
+ 'limit',
+ 'before',
+ 'since',
+ ],
+ 'required': [
+ 'editor_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editor_id':
+ (str,),
+ 'limit':
+ (int,),
+ 'before':
+ (datetime,),
+ 'since':
+ (datetime,),
+ },
+ 'attribute_map': {
+ 'editor_id': 'editor_id',
+ 'limit': 'limit',
+ 'before': 'before',
+ 'since': 'since',
+ },
+ 'location_map': {
+ 'editor_id': 'path',
+ 'limit': 'query',
+ 'before': 'query',
+ 'since': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.lookup_editor_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editor,),
+ 'auth': [],
+ 'endpoint_path': '/editor/lookup',
+ 'operation_id': 'lookup_editor',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'username',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'username':
+ (str,),
+ },
+ 'attribute_map': {
+ 'username': 'username',
+ },
+ 'location_map': {
+ 'username': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_editor_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editor,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editor/{editor_id}',
+ 'operation_id': 'update_editor',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editor_id',
+ 'editor',
+ ],
+ 'required': [
+ 'editor_id',
+ 'editor',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editor_id':
+ (str,),
+ 'editor':
+ (Editor,),
+ },
+ 'attribute_map': {
+ 'editor_id': 'editor_id',
+ },
+ 'location_map': {
+ 'editor_id': 'path',
+ 'editor': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def get_editor(
+ self,
+ editor_id,
+ **kwargs
+ ):
+ """get_editor # noqa: E501
+
+ Returns an editor object, including metadata such as the username, type, and role of editor. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editor(editor_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editor_id (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editor
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editor_id'] = \
+ editor_id
+ return self.get_editor_endpoint.call_with_http_info(**kwargs)
+
+ def get_editor_annotations(
+ self,
+ editor_id,
+ **kwargs
+ ):
+ """get_editor_annotations # noqa: E501
+
+ Fetches a list of annotations made by a particular editor. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editor_annotations(editor_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editor_id (str): base32-encoded unique identifier
+
+ Keyword Args:
+ limit (int): Maximum number (count) of annotations to return in response. [optional]
+ before (datetime): Return only annotations made *before* the given timestamp (not inclusive). Annotations will be sorted by creation time in descending order (most recent first). For use in pagination. . [optional]
+ since (datetime): Return only annotations made *after* the given timestamp (not inclusive). Annotations will be sorted by creation time in ascending order (most recent last). For use in pagination. . [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EditgroupAnnotation]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editor_id'] = \
+ editor_id
+ return self.get_editor_annotations_endpoint.call_with_http_info(**kwargs)
+
+ def get_editor_editgroups(
+ self,
+ editor_id,
+ **kwargs
+ ):
+ """get_editor_editgroups # noqa: E501
+
+ Returns a set of editgroups created by the given editor, regardless of the status (accepted/submitted) of the editgroups. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_editor_editgroups(editor_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editor_id (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ before (datetime): Return only editgroups created *before* the given timestamp (not inclusive). Editgroups will be sorted by creation time in descending order (most recent first). For use in pagination. . [optional]
+ since (datetime): Return only editgroups created *after* the given timestamp (not inclusive). Editgroups will be sorted by creation time in ascending order (most recent last). For use in pagination. . [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [Editgroup]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editor_id'] = \
+ editor_id
+ return self.get_editor_editgroups_endpoint.call_with_http_info(**kwargs)
+
+ def lookup_editor(
+ self,
+ **kwargs
+ ):
+ """lookup_editor # noqa: E501
+
+ Fetches editor by, eg, username. One (and only one) lookup identifier should be specified per request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.lookup_editor(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ username (str): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editor
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.lookup_editor_endpoint.call_with_http_info(**kwargs)
+
+ def update_editor(
+ self,
+ editor_id,
+ editor,
+ **kwargs
+ ):
+ """update_editor # noqa: E501
+
+ Allows metadata changes to some editor fields, such as the username. Changes require authentication and permissions. An editor can change their own username; changes to role flags require the `admin` role by the editor making the request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_editor(editor_id, editor, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editor_id (str):
+ editor (Editor):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editor
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editor_id'] = \
+ editor_id
+ kwargs['editor'] = \
+ editor
+ return self.update_editor_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/files_api.py b/python_openapi_client/fatcat_openapi_client/api/files_api.py
new file mode 100644
index 00000000..05507605
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/files_api.py
@@ -0,0 +1,1627 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch
+from fatcat_openapi_client.model.file_entity import FileEntity
+from fatcat_openapi_client.model.success import Success
+
+
+class FilesApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_file_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/file',
+ 'operation_id': 'create_file',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (FileEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_file_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/file/batch',
+ 'operation_id': 'create_file_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (FileAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_file_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/file/{ident}',
+ 'operation_id': 'delete_file',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_file_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/file/edit/{edit_id}',
+ 'operation_id': 'delete_file_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_file_endpoint = _Endpoint(
+ settings={
+ 'response_type': (FileEntity,),
+ 'auth': [],
+ 'endpoint_path': '/file/{ident}',
+ 'operation_id': 'get_file',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_file_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/file/edit/{edit_id}',
+ 'operation_id': 'get_file_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_file_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/file/{ident}/history',
+ 'operation_id': 'get_file_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_file_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/file/{ident}/redirects',
+ 'operation_id': 'get_file_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_file_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (FileEntity,),
+ 'auth': [],
+ 'endpoint_path': '/file/rev/{rev_id}',
+ 'operation_id': 'get_file_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.lookup_file_endpoint = _Endpoint(
+ settings={
+ 'response_type': (FileEntity,),
+ 'auth': [],
+ 'endpoint_path': '/file/lookup',
+ 'operation_id': 'lookup_file',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'md5',
+ 'sha1',
+ 'sha256',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'md5',
+ 'sha1',
+ 'sha256',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('md5',): {
+ 'max_length': 32,
+ 'min_length': 32,
+ },
+ ('sha1',): {
+ 'max_length': 40,
+ 'min_length': 40,
+ },
+ ('sha256',): {
+ 'max_length': 64,
+ 'min_length': 64,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'md5':
+ (str,),
+ 'sha1':
+ (str,),
+ 'sha256':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'md5': 'md5',
+ 'sha1': 'sha1',
+ 'sha256': 'sha256',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'md5': 'query',
+ 'sha1': 'query',
+ 'sha256': 'query',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_file_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/file/{ident}',
+ 'operation_id': 'update_file',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (FileEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_file(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_file(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (FileEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_file_endpoint.call_with_http_info(**kwargs)
+
+ def create_file_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_file_auto_batch # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_file_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (FileAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_file_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_file(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_file(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_file_endpoint.call_with_http_info(**kwargs)
+
+ def delete_file_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_file_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_file_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_file_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_file(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_file(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For files, `releases` is accepted.. [optional]
+ hide (str): List of entity fields to elide in response. For files, none accepted (yet).. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ FileEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_file_endpoint.call_with_http_info(**kwargs)
+
+ def get_file_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_file_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_file_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_file_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_file_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_file_history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_file_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_file_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_file_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_file_redirects # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_file_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_file_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_file_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_file_revision # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_file_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_file`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_file`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ FileEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_file_revision_endpoint.call_with_http_info(**kwargs)
+
+ def lookup_file(
+ self,
+ **kwargs
+ ):
+ """lookup_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.lookup_file(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ md5 (str): MD5 hash of data, in hex encoding. [optional]
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional]
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional]
+ expand (str): List of sub-entities to expand in response. See `get_file`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_file`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ FileEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.lookup_file_endpoint.call_with_http_info(**kwargs)
+
+ def update_file(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_file # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_file(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (FileEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_file_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/filesets_api.py b/python_openapi_client/fatcat_openapi_client/api/filesets_api.py
new file mode 100644
index 00000000..e9c45e87
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/filesets_api.py
@@ -0,0 +1,1463 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+from fatcat_openapi_client.model.success import Success
+
+
+class FilesetsApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_fileset_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/fileset',
+ 'operation_id': 'create_fileset',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (FilesetEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_fileset_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/fileset/batch',
+ 'operation_id': 'create_fileset_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (FilesetAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_fileset_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/fileset/{ident}',
+ 'operation_id': 'delete_fileset',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_fileset_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/fileset/edit/{edit_id}',
+ 'operation_id': 'delete_fileset_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_fileset_endpoint = _Endpoint(
+ settings={
+ 'response_type': (FilesetEntity,),
+ 'auth': [],
+ 'endpoint_path': '/fileset/{ident}',
+ 'operation_id': 'get_fileset',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_fileset_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/fileset/edit/{edit_id}',
+ 'operation_id': 'get_fileset_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_fileset_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/fileset/{ident}/history',
+ 'operation_id': 'get_fileset_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_fileset_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/fileset/{ident}/redirects',
+ 'operation_id': 'get_fileset_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_fileset_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (FilesetEntity,),
+ 'auth': [],
+ 'endpoint_path': '/fileset/rev/{rev_id}',
+ 'operation_id': 'get_fileset_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_fileset_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/fileset/{ident}',
+ 'operation_id': 'update_fileset',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (FilesetEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_fileset(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_fileset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_fileset(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (FilesetEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_fileset_endpoint.call_with_http_info(**kwargs)
+
+ def create_fileset_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_fileset_auto_batch # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_fileset_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (FilesetAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_fileset_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_fileset(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_fileset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_fileset(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_fileset_endpoint.call_with_http_info(**kwargs)
+
+ def delete_fileset_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_fileset_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_fileset_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_fileset_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_fileset(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_fileset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_fileset(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For filesets, `releases` is accepted.. [optional]
+ hide (str): List of entity fields to elide in response. For filesets, 'manifest' is accepted.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ FilesetEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_fileset_endpoint.call_with_http_info(**kwargs)
+
+ def get_fileset_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_fileset_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_fileset_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_fileset_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_fileset_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_fileset_history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_fileset_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_fileset_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_fileset_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_fileset_redirects # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_fileset_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_fileset_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_fileset_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_fileset_revision # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_fileset_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_fileset`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_fileset`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ FilesetEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_fileset_revision_endpoint.call_with_http_info(**kwargs)
+
+ def update_fileset(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_fileset # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_fileset(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (FilesetEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_fileset_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/releases_api.py b/python_openapi_client/fatcat_openapi_client/api/releases_api.py
new file mode 100644
index 00000000..0de0213b
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/releases_api.py
@@ -0,0 +1,2106 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.file_entity import FileEntity
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.success import Success
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+
+
+class ReleasesApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_release_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/release',
+ 'operation_id': 'create_release',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (ReleaseEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_release_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/release/batch',
+ 'operation_id': 'create_release_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (ReleaseAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_release_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/release/{ident}',
+ 'operation_id': 'delete_release',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_release_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/release/edit/{edit_id}',
+ 'operation_id': 'delete_release_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ReleaseEntity,),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}',
+ 'operation_id': 'get_release',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/release/edit/{edit_id}',
+ 'operation_id': 'get_release_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_files_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([FileEntity],),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}/files',
+ 'operation_id': 'get_release_files',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_filesets_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([FilesetEntity],),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}/filesets',
+ 'operation_id': 'get_release_filesets',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}/history',
+ 'operation_id': 'get_release_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}/redirects',
+ 'operation_id': 'get_release_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ReleaseEntity,),
+ 'auth': [],
+ 'endpoint_path': '/release/rev/{rev_id}',
+ 'operation_id': 'get_release_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_release_webcaptures_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([WebcaptureEntity],),
+ 'auth': [],
+ 'endpoint_path': '/release/{ident}/webcaptures',
+ 'operation_id': 'get_release_webcaptures',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.lookup_release_endpoint = _Endpoint(
+ settings={
+ 'response_type': (ReleaseEntity,),
+ 'auth': [],
+ 'endpoint_path': '/release/lookup',
+ 'operation_id': 'lookup_release',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'doi',
+ 'wikidata_qid',
+ 'isbn13',
+ 'pmid',
+ 'pmcid',
+ 'core',
+ 'arxiv',
+ 'jstor',
+ 'ark',
+ 'mag',
+ 'doaj',
+ 'dblp',
+ 'oai',
+ 'hdl',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'doi':
+ (str,),
+ 'wikidata_qid':
+ (str,),
+ 'isbn13':
+ (str,),
+ 'pmid':
+ (str,),
+ 'pmcid':
+ (str,),
+ 'core':
+ (str,),
+ 'arxiv':
+ (str,),
+ 'jstor':
+ (str,),
+ 'ark':
+ (str,),
+ 'mag':
+ (str,),
+ 'doaj':
+ (str,),
+ 'dblp':
+ (str,),
+ 'oai':
+ (str,),
+ 'hdl':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'doi': 'doi',
+ 'wikidata_qid': 'wikidata_qid',
+ 'isbn13': 'isbn13',
+ 'pmid': 'pmid',
+ 'pmcid': 'pmcid',
+ 'core': 'core',
+ 'arxiv': 'arxiv',
+ 'jstor': 'jstor',
+ 'ark': 'ark',
+ 'mag': 'mag',
+ 'doaj': 'doaj',
+ 'dblp': 'dblp',
+ 'oai': 'oai',
+ 'hdl': 'hdl',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'doi': 'query',
+ 'wikidata_qid': 'query',
+ 'isbn13': 'query',
+ 'pmid': 'query',
+ 'pmcid': 'query',
+ 'core': 'query',
+ 'arxiv': 'query',
+ 'jstor': 'query',
+ 'ark': 'query',
+ 'mag': 'query',
+ 'doaj': 'query',
+ 'dblp': 'query',
+ 'oai': 'query',
+ 'hdl': 'query',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_release_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/release/{ident}',
+ 'operation_id': 'update_release',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (ReleaseEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_release(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_release # noqa: E501
+
+ Create a single Release entity as part of an existing editgroup. If the `work_id` field is not set, a work entity will be created automatically and this field set pointing to the new work. Editgroup must be mutable (aka, not accepted) and editor must have permission (aka, have created the editgrou p or have `admin` role). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_release(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (ReleaseEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_release_endpoint.call_with_http_info(**kwargs)
+
+ def create_release_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_release_auto_batch # noqa: E501
+
+ Create a set of Release entities as part of a new editgroup, and accept that editgroup in the same atomic request. This method is mostly useful for bulk import of new entities by carefully written bots. This method is more efficient than creating an editgroup, several entities, then accepting the editgroup, both in terms of API requests required and database load. Requires `admin` role. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_release_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (ReleaseAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_release_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_release(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_release # noqa: E501
+
+ Creates a new \"deletion\" edit for a specific entity as part of an existing editgroup. This is not the method to use to remove an edit from an editgroup; for that use `delete_release_edit`. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_release(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_release_endpoint.call_with_http_info(**kwargs)
+
+ def delete_release_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_release_edit # noqa: E501
+
+ Removes a single edit from the specified editgroup. The editgroup must be mutable (aka, not accepted/merged), and the editor making this request must have permission (aka, have created the editgroup or hold the `admin` role). Not to be confused with the `delete_container` method, which *creates* a new edit in the given editgroup. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_release_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_release_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_release(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release # noqa: E501
+
+ Fetches a single Release entity from the catalog. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For releases, 'files', 'filesets, 'webcaptures', 'container', and 'creators' are valid. . [optional]
+ hide (str): List of entity fields to elide in response (for efficiency). For releases, 'abstracts', 'refs', and 'contribs' are valid. . [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ReleaseEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_release_edit # noqa: E501
+
+ Returns the entity edit object with the given identifier. This method is expected to be used rarely. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_release_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_files(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release_files # noqa: E501
+
+ Returns the set of File entities that have a `release_id` pointing to this release entity. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_files(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ hide (str): List of entity fields to elide in response. See `get_file`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [FileEntity]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_files_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_filesets(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release_filesets # noqa: E501
+
+ Returns the set of Fileset entities that have a `release_id` pointing to this release entity. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_filesets(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ hide (str): List of entity fields to elide in response. See `get_fileset`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [FilesetEntity]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_filesets_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release_history # noqa: E501
+
+ Fetches the history of accepted edits (changelog entries) for a specific entity fatcat identifier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release_redirects # noqa: E501
+
+ Returns the set of entity identifiers which currently redirect to this identifier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_release_revision # noqa: E501
+
+ Fetches a specific entity revision. Note that the returned revision will not be associated with any particular fatcat identifier (even if one or more identifiers do currently point to this revision). The revision may even be part of an un-merged editgroup. Revisions are immutable and can not be deleted or updated. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_release`, though note that identifier-based exapansions like `file` will always be empty for revisions.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_release`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ReleaseEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_release_revision_endpoint.call_with_http_info(**kwargs)
+
+ def get_release_webcaptures(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_release_webcaptures # noqa: E501
+
+ Returns the set of Web Capture entities that have a `release_id` pointing to this release entity. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_release_webcaptures(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ hide (str): List of entity fields to elide in response. See `get_webcapture`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [WebcaptureEntity]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_release_webcaptures_endpoint.call_with_http_info(**kwargs)
+
+ def lookup_release(
+ self,
+ **kwargs
+ ):
+ """lookup_release # noqa: E501
+
+ Looks for an active entity with the given external identifier. If any such entity is found, returns a single complete entity. If multiple entities have the same external identifier, this is considered a soft catalog error, and the behavior of which entity is returned is undefined. One (and only one) external identifier should be specified per request. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.lookup_release(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ doi (str): [optional]
+ wikidata_qid (str): [optional]
+ isbn13 (str): [optional]
+ pmid (str): [optional]
+ pmcid (str): [optional]
+ core (str): [optional]
+ arxiv (str): [optional]
+ jstor (str): [optional]
+ ark (str): [optional]
+ mag (str): [optional]
+ doaj (str): [optional]
+ dblp (str): [optional]
+ oai (str): [optional]
+ hdl (str): [optional]
+ expand (str): List of sub-entities to expand in response. See `get_release`.. [optional]
+ hide (str): List of sub-entities to elide in response. See `get_release`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ReleaseEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ return self.lookup_release_endpoint.call_with_http_info(**kwargs)
+
+ def update_release(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_release # noqa: E501
+
+ Updates an existing entity as part of a specific (existing) editgroup. The editgroup must be open for updates (aka, not accepted/merged), and the editor making the request must have permissions (aka, must have created the editgroup or have `admin` role). This method can also be used to update an existing entity edit as part of an editgroup. For example, if an entity was created in this editgroup, an editor could make changes to the new entity's metadata before merging. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_release(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (ReleaseEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_release_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/webcaptures_api.py b/python_openapi_client/fatcat_openapi_client/api/webcaptures_api.py
new file mode 100644
index 00000000..bca68ec6
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/webcaptures_api.py
@@ -0,0 +1,1463 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.success import Success
+from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+
+
+class WebcapturesApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_webcapture_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/webcapture',
+ 'operation_id': 'create_webcapture',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (WebcaptureEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_webcapture_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/webcapture/batch',
+ 'operation_id': 'create_webcapture_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (WebcaptureAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_webcapture_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/webcapture/{ident}',
+ 'operation_id': 'delete_webcapture',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_webcapture_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/webcapture/edit/{edit_id}',
+ 'operation_id': 'delete_webcapture_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_webcapture_endpoint = _Endpoint(
+ settings={
+ 'response_type': (WebcaptureEntity,),
+ 'auth': [],
+ 'endpoint_path': '/webcapture/{ident}',
+ 'operation_id': 'get_webcapture',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_webcapture_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/webcapture/edit/{edit_id}',
+ 'operation_id': 'get_webcapture_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_webcapture_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/webcapture/{ident}/history',
+ 'operation_id': 'get_webcapture_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_webcapture_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/webcapture/{ident}/redirects',
+ 'operation_id': 'get_webcapture_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_webcapture_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (WebcaptureEntity,),
+ 'auth': [],
+ 'endpoint_path': '/webcapture/rev/{rev_id}',
+ 'operation_id': 'get_webcapture_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_webcapture_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/webcapture/{ident}',
+ 'operation_id': 'update_webcapture',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (WebcaptureEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_webcapture(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_webcapture # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_webcapture(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (WebcaptureEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_webcapture_endpoint.call_with_http_info(**kwargs)
+
+ def create_webcapture_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_webcapture_auto_batch # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_webcapture_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (WebcaptureAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_webcapture_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_webcapture(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_webcapture # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_webcapture(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_webcapture_endpoint.call_with_http_info(**kwargs)
+
+ def delete_webcapture_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_webcapture_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_webcapture_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_webcapture_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_webcapture(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_webcapture # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_webcapture(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For webcaptures, `releases` is accepted.. [optional]
+ hide (str): List of entity fields to elide in response. For webcaptures, 'cdx' is accepted.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ WebcaptureEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_webcapture_endpoint.call_with_http_info(**kwargs)
+
+ def get_webcapture_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_webcapture_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_webcapture_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_webcapture_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_webcapture_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_webcapture_history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_webcapture_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_webcapture_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_webcapture_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_webcapture_redirects # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_webcapture_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_webcapture_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_webcapture_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_webcapture_revision # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_webcapture_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_webcapture`.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_webcapture`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ WebcaptureEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_webcapture_revision_endpoint.call_with_http_info(**kwargs)
+
+ def update_webcapture(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_webcapture # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_webcapture(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (WebcaptureEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_webcapture_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api/works_api.py b/python_openapi_client/fatcat_openapi_client/api/works_api.py
new file mode 100644
index 00000000..e2a672bd
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/api/works_api.py
@@ -0,0 +1,1602 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.success import Success
+from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch
+from fatcat_openapi_client.model.work_entity import WorkEntity
+
+
+class WorksApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+ self.create_work_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/work',
+ 'operation_id': 'create_work',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'entity':
+ (WorkEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.create_work_auto_batch_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Editgroup,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/auto/work/batch',
+ 'operation_id': 'create_work_auto_batch',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'auto_batch',
+ ],
+ 'required': [
+ 'auto_batch',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'auto_batch':
+ (WorkAutoBatch,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'auto_batch': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+ self.delete_work_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/work/{ident}',
+ 'operation_id': 'delete_work',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.delete_work_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (Success,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/work/edit/{edit_id}',
+ 'operation_id': 'delete_work_edit',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_endpoint = _Endpoint(
+ settings={
+ 'response_type': (WorkEntity,),
+ 'auth': [],
+ 'endpoint_path': '/work/{ident}',
+ 'operation_id': 'get_work',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_edit_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [],
+ 'endpoint_path': '/work/edit/{edit_id}',
+ 'operation_id': 'get_work_edit',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'edit_id',
+ ],
+ 'required': [
+ 'edit_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'edit_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'edit_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'edit_id': 'edit_id',
+ },
+ 'location_map': {
+ 'edit_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_history_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([EntityHistoryEntry],),
+ 'auth': [],
+ 'endpoint_path': '/work/{ident}/history',
+ 'operation_id': 'get_work_history',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'limit',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'limit':
+ (int,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'limit': 'limit',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'limit': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_redirects_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([str],),
+ 'auth': [],
+ 'endpoint_path': '/work/{ident}/redirects',
+ 'operation_id': 'get_work_redirects',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_releases_endpoint = _Endpoint(
+ settings={
+ 'response_type': ([ReleaseEntity],),
+ 'auth': [],
+ 'endpoint_path': '/work/{ident}/releases',
+ 'operation_id': 'get_work_releases',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'ident',
+ 'hide',
+ ],
+ 'required': [
+ 'ident',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'ident':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'ident': 'ident',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'ident': 'path',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.get_work_revision_endpoint = _Endpoint(
+ settings={
+ 'response_type': (WorkEntity,),
+ 'auth': [],
+ 'endpoint_path': '/work/rev/{rev_id}',
+ 'operation_id': 'get_work_revision',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'rev_id',
+ 'expand',
+ 'hide',
+ ],
+ 'required': [
+ 'rev_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'rev_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('rev_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'rev_id':
+ (str,),
+ 'expand':
+ (str,),
+ 'hide':
+ (str,),
+ },
+ 'attribute_map': {
+ 'rev_id': 'rev_id',
+ 'expand': 'expand',
+ 'hide': 'hide',
+ },
+ 'location_map': {
+ 'rev_id': 'path',
+ 'expand': 'query',
+ 'hide': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client
+ )
+ self.update_work_endpoint = _Endpoint(
+ settings={
+ 'response_type': (EntityEdit,),
+ 'auth': [
+ 'Bearer'
+ ],
+ 'endpoint_path': '/editgroup/{editgroup_id}/work/{ident}',
+ 'operation_id': 'update_work',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'required': [
+ 'editgroup_id',
+ 'ident',
+ 'entity',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'editgroup_id':
+ (str,),
+ 'ident':
+ (str,),
+ 'entity':
+ (WorkEntity,),
+ },
+ 'attribute_map': {
+ 'editgroup_id': 'editgroup_id',
+ 'ident': 'ident',
+ },
+ 'location_map': {
+ 'editgroup_id': 'path',
+ 'ident': 'path',
+ 'entity': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client
+ )
+
+ def create_work(
+ self,
+ editgroup_id,
+ entity,
+ **kwargs
+ ):
+ """create_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_work(editgroup_id, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ entity (WorkEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['entity'] = \
+ entity
+ return self.create_work_endpoint.call_with_http_info(**kwargs)
+
+ def create_work_auto_batch(
+ self,
+ auto_batch,
+ **kwargs
+ ):
+ """create_work_auto_batch # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_work_auto_batch(auto_batch, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ auto_batch (WorkAutoBatch):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Editgroup
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['auto_batch'] = \
+ auto_batch
+ return self.create_work_auto_batch_endpoint.call_with_http_info(**kwargs)
+
+ def delete_work(
+ self,
+ editgroup_id,
+ ident,
+ **kwargs
+ ):
+ """delete_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_work(editgroup_id, ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ return self.delete_work_endpoint.call_with_http_info(**kwargs)
+
+ def delete_work_edit(
+ self,
+ editgroup_id,
+ edit_id,
+ **kwargs
+ ):
+ """delete_work_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_work_edit(editgroup_id, edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Success
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['edit_id'] = \
+ edit_id
+ return self.delete_work_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_work(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. For works, none accepted (yet).. [optional]
+ hide (str): List of entity fields to elide in response. For works, none accepted (yet).. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ WorkEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_work_endpoint.call_with_http_info(**kwargs)
+
+ def get_work_edit(
+ self,
+ edit_id,
+ **kwargs
+ ):
+ """get_work_edit # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work_edit(edit_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ edit_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['edit_id'] = \
+ edit_id
+ return self.get_work_edit_endpoint.call_with_http_info(**kwargs)
+
+ def get_work_history(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_work_history # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work_history(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ limit (int): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [EntityHistoryEntry]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_work_history_endpoint.call_with_http_info(**kwargs)
+
+ def get_work_redirects(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_work_redirects # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work_redirects(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [str]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_work_redirects_endpoint.call_with_http_info(**kwargs)
+
+ def get_work_releases(
+ self,
+ ident,
+ **kwargs
+ ):
+ """get_work_releases # noqa: E501
+
+ Returns the set of release entities that are part of this work (aka, have `work_id` pointing to this work entity). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work_releases(ident, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ ident (str):
+
+ Keyword Args:
+ hide (str): List of entity fields to elide in response. See `get_release`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [ReleaseEntity]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['ident'] = \
+ ident
+ return self.get_work_releases_endpoint.call_with_http_info(**kwargs)
+
+ def get_work_revision(
+ self,
+ rev_id,
+ **kwargs
+ ):
+ """get_work_revision # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_work_revision(rev_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ rev_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit)
+
+ Keyword Args:
+ expand (str): List of sub-entities to expand in response. See `get_work`, though note that identifier-based expansions like `releases` will always be empty for revisions.. [optional]
+ hide (str): List of entity fields to elide in response. See `get_work`.. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ WorkEntity
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['rev_id'] = \
+ rev_id
+ return self.get_work_revision_endpoint.call_with_http_info(**kwargs)
+
+ def update_work(
+ self,
+ editgroup_id,
+ ident,
+ entity,
+ **kwargs
+ ):
+ """update_work # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_work(editgroup_id, ident, entity, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ editgroup_id (str):
+ ident (str):
+ entity (WorkEntity):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (int/float/tuple): timeout setting for this request. If
+ one number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _content_type (str/None): force body content-type.
+ Default is None and content-type will be predicted by allowed
+ content-types and body.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ _request_auths (list): set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ Default is None
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ EntityEdit
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_spec_property_naming'] = kwargs.get(
+ '_spec_property_naming', False
+ )
+ kwargs['_content_type'] = kwargs.get(
+ '_content_type')
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
+ kwargs['editgroup_id'] = \
+ editgroup_id
+ kwargs['ident'] = \
+ ident
+ kwargs['entity'] = \
+ entity
+ return self.update_work_endpoint.call_with_http_info(**kwargs)
+
diff --git a/python_openapi_client/fatcat_openapi_client/api_client.py b/python_openapi_client/fatcat_openapi_client/api_client.py
index eb23f1cd..fb811427 100644
--- a/python_openapi_client/fatcat_openapi_client/api_client.py
+++ b/python_openapi_client/fatcat_openapi_client/api_client.py
@@ -1,4 +1,3 @@
-# coding: utf-8
"""
fatcat
@@ -9,24 +8,36 @@
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-import datetime
import json
+import atexit
import mimetypes
from multiprocessing.pool import ThreadPool
+import io
import os
import re
-import tempfile
+import typing
+from urllib.parse import quote
+from urllib3.fields import RequestField
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import quote
-from fatcat_openapi_client.configuration import Configuration
-import fatcat_openapi_client.models
from fatcat_openapi_client import rest
-from fatcat_openapi_client.exceptions import ApiValueError
+from fatcat_openapi_client.configuration import Configuration
+from fatcat_openapi_client.exceptions import ApiTypeError, ApiValueError, ApiException
+from fatcat_openapi_client.model_utils import (
+ ModelNormal,
+ ModelSimple,
+ ModelComposed,
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ deserialize_file,
+ file_type,
+ model_to_dict,
+ none_type,
+ validate_and_convert_types
+)
class ApiClient(object):
@@ -51,23 +62,12 @@ class ApiClient(object):
to the API. More threads means more concurrent API requests.
"""
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
- NATIVE_TYPES_MAPPING = {
- 'int': int,
- 'long': int if six.PY3 else long, # noqa: F821
- 'float': float,
- 'str': str,
- 'bool': bool,
- 'date': datetime.date,
- 'datetime': datetime.datetime,
- 'object': object,
- }
_pool = None
def __init__(self, configuration=None, header_name=None, header_value=None,
cookie=None, pool_threads=1):
if configuration is None:
- configuration = Configuration()
+ configuration = Configuration.get_default_copy()
self.configuration = configuration
self.pool_threads = pool_threads
@@ -77,13 +77,21 @@ class ApiClient(object):
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
- self.user_agent = 'OpenAPI-Generator/0.5.0/python'
+ self.user_agent = 'OpenAPI-Generator/0.5.1/python'
+
+ def __enter__(self):
+ return self
- def __del__(self):
+ def __exit__(self, exc_type, exc_value, traceback):
+ self.close()
+
+ def close(self):
if self._pool:
self._pool.close()
self._pool.join()
self._pool = None
+ if hasattr(atexit, 'unregister'):
+ atexit.unregister(self.close)
@property
def pool(self):
@@ -91,6 +99,7 @@ class ApiClient(object):
avoids instantiating unused threadpool for blocking clients.
"""
if self._pool is None:
+ atexit.register(self.close)
self._pool = ThreadPool(self.pool_threads)
return self._pool
@@ -107,11 +116,26 @@ class ApiClient(object):
self.default_headers[header_name] = header_value
def __call_api(
- self, resource_path, method, path_params=None,
- query_params=None, header_params=None, body=None, post_params=None,
- files=None, response_type=None, auth_settings=None,
- _return_http_data_only=None, collection_formats=None,
- _preload_content=True, _request_timeout=None, _host=None):
+ self,
+ resource_path: str,
+ method: str,
+ path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ body: typing.Optional[typing.Any] = None,
+ post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
+ response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
+ auth_settings: typing.Optional[typing.List[str]] = None,
+ _return_http_data_only: typing.Optional[bool] = None,
+ collection_formats: typing.Optional[typing.Dict[str, str]] = None,
+ _preload_content: bool = True,
+ _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
+ _host: typing.Optional[str] = None,
+ _check_type: typing.Optional[bool] = None,
+ _content_type: typing.Optional[str] = None,
+ _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
+ ):
config = self.configuration
@@ -150,14 +174,19 @@ class ApiClient(object):
post_params = self.parameters_to_tuples(post_params,
collection_formats)
post_params.extend(self.files_parameters(files))
-
- # auth setting
- self.update_params_for_auth(header_params, query_params, auth_settings)
+ if header_params['Content-Type'].startswith("multipart"):
+ post_params = self.parameters_to_multipart(post_params,
+ (dict))
# body
if body:
body = self.sanitize_for_serialization(body)
+ # auth setting
+ self.update_params_for_auth(header_params, query_params,
+ auth_settings, resource_path, method, body,
+ request_auths=_request_auths)
+
# request url
if _host is None:
url = self.configuration.host + resource_path
@@ -165,22 +194,43 @@ class ApiClient(object):
# use server/host defined in path or operation instead
url = _host + resource_path
- # perform request and return response
- response_data = self.request(
- method, url, query_params=query_params, headers=header_params,
- post_params=post_params, body=body,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout)
+ try:
+ # perform request and return response
+ response_data = self.request(
+ method, url, query_params=query_params, headers=header_params,
+ post_params=post_params, body=body,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
+ except ApiException as e:
+ e.body = e.body.decode('utf-8')
+ raise e
self.last_response = response_data
return_data = response_data
- if _preload_content:
- # deserialize response data
- if response_type:
- return_data = self.deserialize(response_data, response_type)
- else:
- return_data = None
+
+ if not _preload_content:
+ return (return_data)
+ return return_data
+
+ # deserialize response data
+ if response_type:
+ if response_type != (file_type,):
+ encoding = "utf-8"
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
+ if match:
+ encoding = match.group(1)
+ response_data.data = response_data.data.decode(encoding)
+
+ return_data = self.deserialize(
+ response_data,
+ response_type,
+ _check_type
+ )
+ else:
+ return_data = None
if _return_http_data_only:
return (return_data)
@@ -188,9 +238,30 @@ class ApiClient(object):
return (return_data, response_data.status,
response_data.getheaders())
- def sanitize_for_serialization(self, obj):
- """Builds a JSON POST object.
+ def parameters_to_multipart(self, params, collection_types):
+ """Get parameters as list of tuples, formatting as json if value is collection_types
+
+ :param params: Parameters as list of two-tuples
+ :param dict collection_types: Parameter collection types
+ :return: Parameters as list of tuple or urllib3.fields.RequestField
+ """
+ new_params = []
+ if collection_types is None:
+ collection_types = (dict)
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
+ if isinstance(
+ v, collection_types): # v is instance of collection_type, formatting as application/json
+ v = json.dumps(v, ensure_ascii=False).encode("utf-8")
+ field = RequestField(k, v)
+ field.make_multipart(content_type="application/json; charset=utf-8")
+ new_params.append(field)
+ else:
+ new_params.append((k, v))
+ return new_params
+ @classmethod
+ def sanitize_for_serialization(cls, obj):
+ """Prepares data for transmission before it is sent with the rest client
If obj is None, return None.
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date
@@ -198,105 +269,98 @@ class ApiClient(object):
If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is OpenAPI model, return the properties dict.
-
+ If obj is io.IOBase, return the bytes
:param obj: The data to serialize.
:return: The serialized form of data.
"""
- if obj is None:
- return None
- elif isinstance(obj, self.PRIMITIVE_TYPES):
+ if isinstance(obj, (ModelNormal, ModelComposed)):
+ return {
+ key: cls.sanitize_for_serialization(val) for key,
+ val in model_to_dict(
+ obj,
+ serialize=True).items()}
+ elif isinstance(obj, io.IOBase):
+ return cls.get_file_data_and_close_file(obj)
+ elif isinstance(obj, (str, int, float, none_type, bool)):
return obj
- elif isinstance(obj, list):
- return [self.sanitize_for_serialization(sub_obj)
- for sub_obj in obj]
- elif isinstance(obj, tuple):
- return tuple(self.sanitize_for_serialization(sub_obj)
- for sub_obj in obj)
- elif isinstance(obj, (datetime.datetime, datetime.date)):
+ elif isinstance(obj, (datetime, date)):
return obj.isoformat()
-
+ elif isinstance(obj, ModelSimple):
+ return cls.sanitize_for_serialization(obj.value)
+ elif isinstance(obj, (list, tuple)):
+ return [cls.sanitize_for_serialization(item) for item in obj]
if isinstance(obj, dict):
- obj_dict = obj
- else:
- # Convert model obj to dict except
- # attributes `openapi_types`, `attribute_map`
- # and attributes which value is not None.
- # Convert attribute name to json key in
- # model definition for request.
- obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
- for attr, _ in six.iteritems(obj.openapi_types)
- if getattr(obj, attr) is not None}
-
- return {key: self.sanitize_for_serialization(val)
- for key, val in six.iteritems(obj_dict)}
-
- def deserialize(self, response, response_type):
+ return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
+ raise ApiValueError(
+ 'Unable to prepare type {} for serialization'.format(
+ obj.__class__.__name__))
+
+ def deserialize(self, response, response_type, _check_type):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
- :param response_type: class literal for
- deserialized object, or string of class name.
+ :param response_type: For the response, a tuple containing:
+ valid classes
+ a list containing valid classes (for list schemas)
+ a dict containing a tuple of valid classes as the value
+ Example values:
+ (str,)
+ (Pet,)
+ (float, none_type)
+ ([int, none_type],)
+ ({str: (bool, str, int, float, date, datetime, str, none_type)},)
+ :param _check_type: boolean, whether to check the types of the data
+ received from the server
+ :type _check_type: bool
:return: deserialized object.
"""
# handle file downloading
# save response body into a tmp file and return the instance
- if response_type == "file":
- return self.__deserialize_file(response)
+ if response_type == (file_type,):
+ content_disposition = response.getheader("Content-Disposition")
+ return deserialize_file(response.data, self.configuration,
+ content_disposition=content_disposition)
# fetch data from response object
try:
- data = json.loads(response.data)
+ received_data = json.loads(response.data)
except ValueError:
- data = response.data
-
- return self.__deserialize(data, response_type)
-
- def __deserialize(self, data, klass):
- """Deserializes dict, list, str into an object.
-
- :param data: dict, list or str.
- :param klass: class literal, or string of class name.
-
- :return: object.
- """
- if data is None:
- return None
-
- if type(klass) == str:
- if klass.startswith('list['):
- sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
- return [self.__deserialize(sub_data, sub_kls)
- for sub_data in data]
-
- if klass.startswith('dict('):
- sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
- return {k: self.__deserialize(v, sub_kls)
- for k, v in six.iteritems(data)}
-
- # convert str to class
- if klass in self.NATIVE_TYPES_MAPPING:
- klass = self.NATIVE_TYPES_MAPPING[klass]
- else:
- klass = getattr(fatcat_openapi_client.models, klass)
-
- if klass in self.PRIMITIVE_TYPES:
- return self.__deserialize_primitive(data, klass)
- elif klass == object:
- return self.__deserialize_object(data)
- elif klass == datetime.date:
- return self.__deserialize_date(data)
- elif klass == datetime.datetime:
- return self.__deserialize_datatime(data)
- else:
- return self.__deserialize_model(data, klass)
-
- def call_api(self, resource_path, method,
- path_params=None, query_params=None, header_params=None,
- body=None, post_params=None, files=None,
- response_type=None, auth_settings=None, async_req=None,
- _return_http_data_only=None, collection_formats=None,
- _preload_content=True, _request_timeout=None, _host=None):
+ received_data = response.data
+
+ # store our data under the key of 'received_data' so users have some
+ # context if they are deserializing a string and the data type is wrong
+ deserialized_data = validate_and_convert_types(
+ received_data,
+ response_type,
+ ['received_data'],
+ True,
+ _check_type,
+ configuration=self.configuration
+ )
+ return deserialized_data
+
+ def call_api(
+ self,
+ resource_path: str,
+ method: str,
+ path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ body: typing.Optional[typing.Any] = None,
+ post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
+ response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
+ auth_settings: typing.Optional[typing.List[str]] = None,
+ async_req: typing.Optional[bool] = None,
+ _return_http_data_only: typing.Optional[bool] = None,
+ collection_formats: typing.Optional[typing.Dict[str, str]] = None,
+ _preload_content: bool = True,
+ _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
+ _host: typing.Optional[str] = None,
+ _check_type: typing.Optional[bool] = None,
+ _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
+ ):
"""Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
@@ -311,21 +375,42 @@ class ApiClient(object):
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
- :param response: Response data type.
- :param files dict: key -> filename, value -> filepath,
- for `multipart/form-data`.
+ :param response_type: For the response, a tuple containing:
+ valid classes
+ a list containing valid classes (for list schemas)
+ a dict containing a tuple of valid classes as the value
+ Example values:
+ (str,)
+ (Pet,)
+ (float, none_type)
+ ([int, none_type],)
+ ({str: (bool, str, int, float, date, datetime, str, none_type)},)
+ :param files: key -> field name, value -> a list of open file
+ objects for `multipart/form-data`.
+ :type files: dict
:param async_req bool: execute request asynchronously
+ :type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
+ :type _return_http_data_only: bool, optional
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
+ :type collection_formats: dict, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
+ :type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
+ :param _check_type: boolean describing if the data back from the server
+ should have its type checked.
+ :type _check_type: bool, optional
+ :param _request_auths: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auths: list, optional
:return:
If async_req parameter is True,
the request will be called asynchronously.
@@ -339,19 +424,21 @@ class ApiClient(object):
body, post_params, files,
response_type, auth_settings,
_return_http_data_only, collection_formats,
- _preload_content, _request_timeout, _host)
- else:
- thread = self.pool.apply_async(self.__call_api, (resource_path,
- method, path_params, query_params,
- header_params, body,
- post_params, files,
- response_type, auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- _host))
- return thread
+ _preload_content, _request_timeout, _host,
+ _check_type, _request_auths=_request_auths)
+
+ return self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params,
+ query_params,
+ header_params, body,
+ post_params, files,
+ response_type,
+ auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content,
+ _request_timeout,
+ _host, _check_type, None, _request_auths))
def request(self, method, url, query_params=None, headers=None,
post_params=None, body=None, _preload_content=True,
@@ -424,7 +511,7 @@ class ApiClient(object):
new_params = []
if collection_formats is None:
collection_formats = {}
- for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
@@ -444,27 +531,44 @@ class ApiClient(object):
new_params.append((k, v))
return new_params
- def files_parameters(self, files=None):
+ @staticmethod
+ def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
+ file_data = file_instance.read()
+ file_instance.close()
+ return file_data
+
+ def files_parameters(self,
+ files: typing.Optional[typing.Dict[str,
+ typing.List[io.IOBase]]] = None):
"""Builds form parameters.
- :param files: File parameters.
- :return: Form parameters with files.
+ :param files: None or a dict with key=param_name and
+ value is a list of open file objects
+ :return: List of tuples of form parameters with file data
"""
- params = []
+ if files is None:
+ return []
- if files:
- for k, v in six.iteritems(files):
- if not v:
+ params = []
+ for param_name, file_instances in files.items():
+ if file_instances is None:
+ # if the file field is nullable, skip None values
+ continue
+ for file_instance in file_instances:
+ if file_instance is None:
+ # if the file field is nullable, skip None values
continue
- file_names = v if type(v) is list else [v]
- for n in file_names:
- with open(n, 'rb') as f:
- filename = os.path.basename(f.name)
- filedata = f.read()
- mimetype = (mimetypes.guess_type(filename)[0] or
- 'application/octet-stream')
- params.append(
- tuple([k, tuple([filename, filedata, mimetype])]))
+ if file_instance.closed is True:
+ raise ApiValueError(
+ "Cannot read a closed file. The passed in file_type "
+ "for %s must be open." % param_name
+ )
+ filename = os.path.basename(file_instance.name)
+ filedata = self.get_file_data_and_close_file(file_instance)
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
+ params.append(
+ tuple([param_name, tuple([filename, filedata, mimetype])]))
return params
@@ -484,158 +588,310 @@ class ApiClient(object):
else:
return ', '.join(accepts)
- def select_header_content_type(self, content_types):
+ def select_header_content_type(self, content_types, method=None, body=None):
"""Returns `Content-Type` based on an array of content_types provided.
:param content_types: List of content-types.
+ :param method: http method (e.g. POST, PATCH).
+ :param body: http body to send.
:return: Content-Type (e.g. application/json).
"""
if not content_types:
- return 'application/json'
+ return None
content_types = [x.lower() for x in content_types]
+ if (method == 'PATCH' and
+ 'application/json-patch+json' in content_types and
+ isinstance(body, list)):
+ return 'application/json-patch+json'
+
if 'application/json' in content_types or '*/*' in content_types:
return 'application/json'
else:
return content_types[0]
- def update_params_for_auth(self, headers, querys, auth_settings):
+ def update_params_for_auth(self, headers, queries, auth_settings,
+ resource_path, method, body, request_auths=None):
"""Updates header and query params based on authentication setting.
:param headers: Header parameters dict to be updated.
- :param querys: Query parameters tuple list to be updated.
+ :param queries: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
+ :param resource_path: A string representation of the HTTP request resource path.
+ :param method: A string representation of the HTTP request method.
+ :param body: A object representing the body of the HTTP request.
+ The object type is the return value of _encoder.default().
+ :param request_auths: if set, the provided settings will
+ override the token in the configuration.
"""
if not auth_settings:
return
+ if request_auths:
+ for auth_setting in request_auths:
+ self._apply_auth_params(
+ headers, queries, resource_path, method, body, auth_setting)
+ return
+
for auth in auth_settings:
auth_setting = self.configuration.auth_settings().get(auth)
if auth_setting:
- if not auth_setting['value']:
- continue
- elif auth_setting['in'] == 'cookie':
- headers['Cookie'] = auth_setting['value']
- elif auth_setting['in'] == 'header':
- headers[auth_setting['key']] = auth_setting['value']
- elif auth_setting['in'] == 'query':
- querys.append((auth_setting['key'], auth_setting['value']))
- else:
- raise ApiValueError(
- 'Authentication token must be in `query` or `header`'
- )
-
- def __deserialize_file(self, response):
- """Deserializes body to file
+ self._apply_auth_params(
+ headers, queries, resource_path, method, body, auth_setting)
+
+ def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting):
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
- Saves response body into a file in a temporary folder,
- using the filename from the `Content-Disposition` header if provided.
- :param response: RESTResponse.
- :return: file path.
+class Endpoint(object):
+ def __init__(self, settings=None, params_map=None, root_map=None,
+ headers_map=None, api_client=None, callable=None):
+ """Creates an endpoint
+
+ Args:
+ settings (dict): see below key value pairs
+ 'response_type' (tuple/None): response type
+ 'auth' (list): a list of auth type keys
+ 'endpoint_path' (str): the endpoint path
+ 'operation_id' (str): endpoint string identifier
+ 'http_method' (str): POST/PUT/PATCH/GET etc
+ 'servers' (list): list of str servers that this endpoint is at
+ params_map (dict): see below key value pairs
+ 'all' (list): list of str endpoint parameter names
+ 'required' (list): list of required parameter names
+ 'nullable' (list): list of nullable parameter names
+ 'enum' (list): list of parameters with enum values
+ 'validation' (list): list of parameters with validations
+ root_map
+ 'validations' (dict): the dict mapping endpoint parameter tuple
+ paths to their validation dictionaries
+ 'allowed_values' (dict): the dict mapping endpoint parameter
+ tuple paths to their allowed_values (enum) dictionaries
+ 'openapi_types' (dict): param_name to openapi type
+ 'attribute_map' (dict): param_name to camelCase name
+ 'location_map' (dict): param_name to 'body', 'file', 'form',
+ 'header', 'path', 'query'
+ collection_format_map (dict): param_name to `csv` etc.
+ headers_map (dict): see below key value pairs
+ 'accept' (list): list of Accept header strings
+ 'content_type' (list): list of Content-Type header strings
+ api_client (ApiClient) api client instance
+ callable (function): the function which is invoked when the
+ Endpoint is called
"""
- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
- os.close(fd)
- os.remove(path)
-
- content_disposition = response.getheader("Content-Disposition")
- if content_disposition:
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
- content_disposition).group(1)
- path = os.path.join(os.path.dirname(path), filename)
+ self.settings = settings
+ self.params_map = params_map
+ self.params_map['all'].extend([
+ 'async_req',
+ '_host_index',
+ '_preload_content',
+ '_request_timeout',
+ '_return_http_data_only',
+ '_check_input_type',
+ '_check_return_type',
+ '_content_type',
+ '_spec_property_naming',
+ '_request_auths'
+ ])
+ self.params_map['nullable'].extend(['_request_timeout'])
+ self.validations = root_map['validations']
+ self.allowed_values = root_map['allowed_values']
+ self.openapi_types = root_map['openapi_types']
+ extra_types = {
+ 'async_req': (bool,),
+ '_host_index': (none_type, int),
+ '_preload_content': (bool,),
+ '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]),
+ '_return_http_data_only': (bool,),
+ '_check_input_type': (bool,),
+ '_check_return_type': (bool,),
+ '_spec_property_naming': (bool,),
+ '_content_type': (none_type, str),
+ '_request_auths': (none_type, list)
+ }
+ self.openapi_types.update(extra_types)
+ self.attribute_map = root_map['attribute_map']
+ self.location_map = root_map['location_map']
+ self.collection_format_map = root_map['collection_format_map']
+ self.headers_map = headers_map
+ self.api_client = api_client
+ self.callable = callable
+
+ def __validate_inputs(self, kwargs):
+ for param in self.params_map['enum']:
+ if param in kwargs:
+ check_allowed_values(
+ self.allowed_values,
+ (param,),
+ kwargs[param]
+ )
- with open(path, "wb") as f:
- f.write(response.data)
+ for param in self.params_map['validation']:
+ if param in kwargs:
+ check_validations(
+ self.validations,
+ (param,),
+ kwargs[param],
+ configuration=self.api_client.configuration
+ )
- return path
+ if kwargs['_check_input_type'] is False:
+ return
- def __deserialize_primitive(self, data, klass):
- """Deserializes string to primitive type.
+ for key, value in kwargs.items():
+ fixed_val = validate_and_convert_types(
+ value,
+ self.openapi_types[key],
+ [key],
+ kwargs['_spec_property_naming'],
+ kwargs['_check_input_type'],
+ configuration=self.api_client.configuration
+ )
+ kwargs[key] = fixed_val
+
+ def __gather_params(self, kwargs):
+ params = {
+ 'body': None,
+ 'collection_format': {},
+ 'file': {},
+ 'form': [],
+ 'header': {},
+ 'path': {},
+ 'query': []
+ }
+
+ for param_name, param_value in kwargs.items():
+ param_location = self.location_map.get(param_name)
+ if param_location is None:
+ continue
+ if param_location:
+ if param_location == 'body':
+ params['body'] = param_value
+ continue
+ base_name = self.attribute_map[param_name]
+ if (param_location == 'form' and
+ self.openapi_types[param_name] == (file_type,)):
+ params['file'][base_name] = [param_value]
+ elif (param_location == 'form' and
+ self.openapi_types[param_name] == ([file_type],)):
+ # param_value is already a list
+ params['file'][base_name] = param_value
+ elif param_location in {'form', 'query'}:
+ param_value_full = (base_name, param_value)
+ params[param_location].append(param_value_full)
+ if param_location not in {'form', 'query'}:
+ params[param_location][base_name] = param_value
+ collection_format = self.collection_format_map.get(param_name)
+ if collection_format:
+ params['collection_format'][base_name] = collection_format
- :param data: str.
- :param klass: class literal.
+ return params
- :return: int, long, float, str, bool.
- """
- try:
- return klass(data)
- except UnicodeEncodeError:
- return six.text_type(data)
- except TypeError:
- return data
+ def __call__(self, *args, **kwargs):
+ """ This method is invoked when endpoints are called
+ Example:
- def __deserialize_object(self, value):
- """Return an original value.
+ api_instance = AuthApi()
+ api_instance.auth_check # this is an instance of the class Endpoint
+ api_instance.auth_check() # this invokes api_instance.auth_check.__call__()
+ which then invokes the callable functions stored in that endpoint at
+ api_instance.auth_check.callable or self.callable in this class
- :return: object.
"""
- return value
+ return self.callable(self, *args, **kwargs)
- def __deserialize_date(self, string):
- """Deserializes string to date.
+ def call_with_http_info(self, **kwargs):
- :param string: str.
- :return: date.
- """
try:
- from dateutil.parser import parse
- return parse(string).date()
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason="Failed to parse `{0}` as date object".format(string)
+ index = self.api_client.configuration.server_operation_index.get(
+ self.settings['operation_id'], self.api_client.configuration.server_index
+ ) if kwargs['_host_index'] is None else kwargs['_host_index']
+ server_variables = self.api_client.configuration.server_operation_variables.get(
+ self.settings['operation_id'], self.api_client.configuration.server_variables
)
+ _host = self.api_client.configuration.get_host_from_settings(
+ index, variables=server_variables, servers=self.settings['servers']
+ )
+ except IndexError:
+ if self.settings['servers']:
+ raise ApiValueError(
+ "Invalid host index. Must be 0 <= index < %s" %
+ len(self.settings['servers'])
+ )
+ _host = None
+
+ for key, value in kwargs.items():
+ if key not in self.params_map['all']:
+ raise ApiTypeError(
+ "Got an unexpected parameter '%s'"
+ " to method `%s`" %
+ (key, self.settings['operation_id'])
+ )
+ # only throw this nullable ApiValueError if _check_input_type
+ # is False, if _check_input_type==True we catch this case
+ # in self.__validate_inputs
+ if (key not in self.params_map['nullable'] and value is None
+ and kwargs['_check_input_type'] is False):
+ raise ApiValueError(
+ "Value may not be None for non-nullable parameter `%s`"
+ " when calling `%s`" %
+ (key, self.settings['operation_id'])
+ )
- def __deserialize_datatime(self, string):
- """Deserializes string to datetime.
-
- The string should be in iso8601 datetime format.
-
- :param string: str.
- :return: datetime.
- """
- try:
- from dateutil.parser import parse
- return parse(string)
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason=(
- "Failed to parse `{0}` as datetime object"
- .format(string)
+ for key in self.params_map['required']:
+ if key not in kwargs.keys():
+ raise ApiValueError(
+ "Missing the required parameter `%s` when calling "
+ "`%s`" % (key, self.settings['operation_id'])
)
- )
- def __deserialize_model(self, data, klass):
- """Deserializes list or dict to model.
+ self.__validate_inputs(kwargs)
- :param data: dict, list.
- :param klass: class literal.
- :return: model object.
- """
+ params = self.__gather_params(kwargs)
- if not klass.openapi_types and not hasattr(klass,
- 'get_real_child_model'):
- return data
-
- kwargs = {}
- if klass.openapi_types is not None:
- for attr, attr_type in six.iteritems(klass.openapi_types):
- if (data is not None and
- klass.attribute_map[attr] in data and
- isinstance(data, (list, dict))):
- value = data[klass.attribute_map[attr]]
- kwargs[attr] = self.__deserialize(value, attr_type)
-
- instance = klass(**kwargs)
-
- if hasattr(instance, 'get_real_child_model'):
- klass_name = instance.get_real_child_model(data)
- if klass_name:
- instance = self.__deserialize(data, klass_name)
- return instance
+ accept_headers_list = self.headers_map['accept']
+ if accept_headers_list:
+ params['header']['Accept'] = self.api_client.select_header_accept(
+ accept_headers_list)
+
+ if kwargs.get('_content_type'):
+ params['header']['Content-Type'] = kwargs['_content_type']
+ else:
+ content_type_headers_list = self.headers_map['content_type']
+ if content_type_headers_list:
+ if params['body'] != "":
+ content_types_list = self.api_client.select_header_content_type(
+ content_type_headers_list, self.settings['http_method'],
+ params['body'])
+ if content_types_list:
+ params['header']['Content-Type'] = content_types_list
+
+ return self.api_client.call_api(
+ self.settings['endpoint_path'], self.settings['http_method'],
+ params['path'],
+ params['query'],
+ params['header'],
+ body=params['body'],
+ post_params=params['form'],
+ files=params['file'],
+ response_type=self.settings['response_type'],
+ auth_settings=self.settings['auth'],
+ async_req=kwargs['async_req'],
+ _check_type=kwargs['_check_return_type'],
+ _return_http_data_only=kwargs['_return_http_data_only'],
+ _preload_content=kwargs['_preload_content'],
+ _request_timeout=kwargs['_request_timeout'],
+ _host=_host,
+ _request_auths=kwargs['_request_auths'],
+ collection_formats=params['collection_format'])
diff --git a/python_openapi_client/fatcat_openapi_client/apis/__init__.py b/python_openapi_client/fatcat_openapi_client/apis/__init__.py
new file mode 100644
index 00000000..7467020b
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/apis/__init__.py
@@ -0,0 +1,27 @@
+
+# flake8: noqa
+
+# Import all APIs into this package.
+# If you have many APIs here with many many models used in each API this may
+# raise a `RecursionError`.
+# In order to avoid this, import only the API that you directly need like:
+#
+# from fatcat_openapi_client.api.auth_api import AuthApi
+#
+# or import this package, but before doing it, use:
+#
+# import sys
+# sys.setrecursionlimit(n)
+
+# Import APIs into API package:
+from fatcat_openapi_client.api.auth_api import AuthApi
+from fatcat_openapi_client.api.changelog_api import ChangelogApi
+from fatcat_openapi_client.api.containers_api import ContainersApi
+from fatcat_openapi_client.api.creators_api import CreatorsApi
+from fatcat_openapi_client.api.editgroups_api import EditgroupsApi
+from fatcat_openapi_client.api.editors_api import EditorsApi
+from fatcat_openapi_client.api.files_api import FilesApi
+from fatcat_openapi_client.api.filesets_api import FilesetsApi
+from fatcat_openapi_client.api.releases_api import ReleasesApi
+from fatcat_openapi_client.api.webcaptures_api import WebcapturesApi
+from fatcat_openapi_client.api.works_api import WorksApi
diff --git a/python_openapi_client/fatcat_openapi_client/configuration.py b/python_openapi_client/fatcat_openapi_client/configuration.py
index dacf77c9..f9707622 100644
--- a/python_openapi_client/fatcat_openapi_client/configuration.py
+++ b/python_openapi_client/fatcat_openapi_client/configuration.py
@@ -1,5 +1,3 @@
-# coding: utf-8
-
"""
fatcat
@@ -11,31 +9,21 @@
"""
-from __future__ import absolute_import
-
import copy
import logging
import multiprocessing
import sys
import urllib3
-import six
-from six.moves import http_client as httplib
-
+from http import client as http_client
+from fatcat_openapi_client.exceptions import ApiValueError
-class TypeWithDefault(type):
- def __init__(cls, name, bases, dct):
- super(TypeWithDefault, cls).__init__(name, bases, dct)
- cls._default = None
-
- def __call__(cls, **kwargs):
- if cls._default is None:
- cls._default = type.__call__(cls, **kwargs)
- return copy.copy(cls._default)
-
- def set_default(cls, default):
- cls._default = copy.copy(default)
+JSON_SCHEMA_VALIDATION_KEYWORDS = {
+ 'multipleOf', 'maximum', 'exclusiveMaximum',
+ 'minimum', 'exclusiveMinimum', 'maxLength',
+ 'minLength', 'pattern', 'maxItems', 'minItems'
+}
class Configuration(object):
"""NOTE: This class is auto generated by OpenAPI Generator
@@ -44,25 +32,111 @@ class Configuration(object):
Do not edit the class manually.
:param host: Base url
+ :param api_key: Dict to store API key(s).
+ Each entry in the dict specifies an API key.
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is the API key secret.
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer)
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is an API key prefix when generating the auth data.
:param username: Username for HTTP basic authentication
:param password: Password for HTTP basic authentication
+ :param discard_unknown_keys: Boolean value indicating whether to discard
+ unknown properties. A server may send a response that includes additional
+ properties that are not known by the client in the following scenarios:
+ 1. The OpenAPI document is incomplete, i.e. it does not match the server
+ implementation.
+ 2. The client was generated using an older version of the OpenAPI document
+ and the server has been upgraded since then.
+ If a schema in the OpenAPI document defines the additionalProperties attribute,
+ then all undeclared properties received by the server are injected into the
+ additional properties map. In that case, there are undeclared properties, and
+ nothing to discard.
+ :param disabled_client_side_validations (string): Comma-separated list of
+ JSON schema validation keywords to disable JSON schema structural validation
+ rules. The following keywords may be specified: multipleOf, maximum,
+ exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
+ maxItems, minItems.
+ By default, the validation is performed for data generated locally by the client
+ and data received from the server, independent of any validation performed by
+ the server side. If the input data does not satisfy the JSON schema validation
+ rules specified in the OpenAPI document, an exception is raised.
+ If disabled_client_side_validations is set, structural validation is
+ disabled. This can be useful to troubleshoot data validation problem, such as
+ when the OpenAPI document validation rules do not match the actual API data
+ received by the server.
+ :param server_index: Index to servers configuration.
+ :param server_variables: Mapping with string values to replace variables in
+ templated server configuration. The validation of enums is performed for
+ variables with defined enum values before.
+ :param server_operation_index: Mapping from operation ID to an index to server
+ configuration.
+ :param server_operation_variables: Mapping from operation ID to a mapping with
+ string values to replace variables in templated server configuration.
+ The validation of enums is performed for variables with defined enum values before.
+ :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
+ in PEM format
+
+ :Example:
+
+ API Key Authentication Example.
+ Given the following security scheme in the OpenAPI specification:
+ components:
+ securitySchemes:
+ cookieAuth: # name for the security scheme
+ type: apiKey
+ in: cookie
+ name: JSESSIONID # cookie name
+
+ You can programmatically set the cookie:
+
+conf = fatcat_openapi_client.Configuration(
+ api_key={'cookieAuth': 'abc123'}
+ api_key_prefix={'cookieAuth': 'JSESSIONID'}
+)
+
+ The following cookie will be added to the HTTP request:
+ Cookie: JSESSIONID abc123
"""
- def __init__(self, host="https://api.fatcat.wiki/v0",
- username="", password=""):
+ _default = None
+
+ def __init__(self, host=None,
+ api_key=None, api_key_prefix=None,
+ access_token=None,
+ username=None, password=None,
+ discard_unknown_keys=False,
+ disabled_client_side_validations="",
+ server_index=None, server_variables=None,
+ server_operation_index=None, server_operation_variables=None,
+ ssl_ca_cert=None,
+ ):
"""Constructor
"""
- self.host = host
+ self._base_path = "https://api.fatcat.wiki/v0" if host is None else host
"""Default Base url
"""
+ self.server_index = 0 if server_index is None and host is None else server_index
+ self.server_operation_index = server_operation_index or {}
+ """Default server index
+ """
+ self.server_variables = server_variables or {}
+ self.server_operation_variables = server_operation_variables or {}
+ """Default server variables
+ """
self.temp_folder_path = None
"""Temp file folder for downloading files
"""
# Authentication Settings
+ self.access_token = access_token
self.api_key = {}
+ if api_key:
+ self.api_key = api_key
"""dict to store API key(s)
"""
self.api_key_prefix = {}
+ if api_key_prefix:
+ self.api_key_prefix = api_key_prefix
"""dict to store API prefix (e.g. Bearer)
"""
self.refresh_api_key_hook = None
@@ -74,6 +148,8 @@ class Configuration(object):
self.password = password
"""Password for HTTP basic authentication
"""
+ self.discard_unknown_keys = discard_unknown_keys
+ self.disabled_client_side_validations = disabled_client_side_validations
self.logger = {}
"""Logging Settings
"""
@@ -100,7 +176,7 @@ class Configuration(object):
Set this to false to skip verifying SSL certificate when calling API
from https server.
"""
- self.ssl_ca_cert = None
+ self.ssl_ca_cert = ssl_ca_cert
"""Set this to customize the certificate file to verify the peer.
"""
self.cert_file = None
@@ -124,6 +200,9 @@ class Configuration(object):
self.proxy = None
"""Proxy URL
"""
+ self.no_proxy = None
+ """bypass proxy for host in the no_proxy list.
+ """
self.proxy_headers = None
"""Proxy headers
"""
@@ -133,6 +212,60 @@ class Configuration(object):
self.retries = None
"""Adding retries to override urllib3 default value 3
"""
+ # Enable client side validation
+ self.client_side_validation = True
+
+ # Options to pass down to the underlying urllib3 socket
+ self.socket_options = None
+
+ def __deepcopy__(self, memo):
+ cls = self.__class__
+ result = cls.__new__(cls)
+ memo[id(self)] = result
+ for k, v in self.__dict__.items():
+ if k not in ('logger', 'logger_file_handler'):
+ setattr(result, k, copy.deepcopy(v, memo))
+ # shallow copy of loggers
+ result.logger = copy.copy(self.logger)
+ # use setters to configure loggers
+ result.logger_file = self.logger_file
+ result.debug = self.debug
+ return result
+
+ def __setattr__(self, name, value):
+ object.__setattr__(self, name, value)
+ if name == 'disabled_client_side_validations':
+ s = set(filter(None, value.split(',')))
+ for v in s:
+ if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
+ raise ApiValueError(
+ "Invalid keyword: '{0}''".format(v))
+ self._disabled_client_side_validations = s
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of configuration.
+
+ It stores default configuration, which can be
+ returned by get_default_copy method.
+
+ :param default: object of Configuration
+ """
+ cls._default = copy.deepcopy(default)
+
+ @classmethod
+ def get_default_copy(cls):
+ """Return new instance of configuration.
+
+ This method returns newly created, based on default constructor,
+ object of Configuration class or returns a copy of default
+ configuration passed by the set_default method.
+
+ :return: The configuration object.
+ """
+ if cls._default is not None:
+ return copy.deepcopy(cls._default)
+ return Configuration()
@property
def logger_file(self):
@@ -162,7 +295,7 @@ class Configuration(object):
# then add file handler and remove stream handler.
self.logger_file_handler = logging.FileHandler(self.__logger_file)
self.logger_file_handler.setFormatter(self.logger_formatter)
- for _, logger in six.iteritems(self.logger):
+ for _, logger in self.logger.items():
logger.addHandler(self.logger_file_handler)
@property
@@ -184,17 +317,17 @@ class Configuration(object):
self.__debug = value
if self.__debug:
# if debug status is True, turn on debug logging
- for _, logger in six.iteritems(self.logger):
+ for _, logger in self.logger.items():
logger.setLevel(logging.DEBUG)
- # turn on httplib debug
- httplib.HTTPConnection.debuglevel = 1
+ # turn on http_client debug
+ http_client.HTTPConnection.debuglevel = 1
else:
# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
- for _, logger in six.iteritems(self.logger):
+ for _, logger in self.logger.items():
logger.setLevel(logging.WARNING)
- # turn off httplib debug
- httplib.HTTPConnection.debuglevel = 0
+ # turn off http_client debug
+ http_client.HTTPConnection.debuglevel = 0
@property
def logger_format(self):
@@ -219,15 +352,16 @@ class Configuration(object):
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)
- def get_api_key_with_prefix(self, identifier):
+ def get_api_key_with_prefix(self, identifier, alias=None):
"""Gets API key (with prefix if set).
:param identifier: The identifier of apiKey.
+ :param alias: The alternative identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
- key = self.api_key.get(identifier)
+ key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
@@ -240,8 +374,14 @@ class Configuration(object):
:return: The token for basic HTTP authentication.
"""
+ username = ""
+ if self.username is not None:
+ username = self.username
+ password = ""
+ if self.password is not None:
+ password = self.password
return urllib3.util.make_headers(
- basic_auth=self.username + ':' + self.password
+ basic_auth=username + ':' + password
).get('authorization')
def auth_settings(self):
@@ -249,15 +389,17 @@ class Configuration(object):
:return: The Auth Settings information dict.
"""
- return {
- 'Bearer':
- {
- 'type': 'api_key',
- 'in': 'header',
- 'key': 'Authorization',
- 'value': self.get_api_key_with_prefix('Authorization')
- },
- }
+ auth = {}
+ if 'Bearer' in self.api_key:
+ auth['Bearer'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': self.get_api_key_with_prefix(
+ 'Bearer',
+ ),
+ }
+ return auth
def to_debug_report(self):
"""Gets the essential information for debugging.
@@ -268,7 +410,7 @@ class Configuration(object):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.5.0\n"\
- "SDK Package Version: 0.5.0".\
+ "SDK Package Version: 0.5.1".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
@@ -283,41 +425,52 @@ class Configuration(object):
}
]
- def get_host_from_settings(self, index, variables={}):
+ def get_host_from_settings(self, index, variables=None, servers=None):
"""Gets host URL based on the index and variables
:param index: array index of the host settings
:param variables: hash of variable and the corresponding value
+ :param servers: an array of host settings or None
:return: URL based on host settings
"""
+ if index is None:
+ return self._base_path
- servers = self.get_host_settings()
+ variables = {} if variables is None else variables
+ servers = self.get_host_settings() if servers is None else servers
- # check array index out of bound
- if index < 0 or index >= len(servers):
+ try:
+ server = servers[index]
+ except IndexError:
raise ValueError(
- "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501
- .format(index, len(servers)))
+ "Invalid index {0} when selecting the host settings. "
+ "Must be less than {1}".format(index, len(servers)))
- server = servers[index]
url = server['url']
- # go through variable and assign a value
- for variable_name in server['variables']:
- if variable_name in variables:
- if variables[variable_name] in server['variables'][
- variable_name]['enum_values']:
- url = url.replace("{" + variable_name + "}",
- variables[variable_name])
- else:
- raise ValueError(
- "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501
- .format(
- variable_name, variables[variable_name],
- server['variables'][variable_name]['enum_values']))
- else:
- # use default value
- url = url.replace(
- "{" + variable_name + "}",
- server['variables'][variable_name]['default_value'])
+ # go through variables and replace placeholders
+ for variable_name, variable in server.get('variables', {}).items():
+ used_value = variables.get(
+ variable_name, variable['default_value'])
+
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
+ raise ValueError(
+ "The variable `{0}` in the host URL has invalid value "
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
+
+ url = url.replace("{" + variable_name + "}", used_value)
return url
+
+ @property
+ def host(self):
+ """Return generated host."""
+ return self.get_host_from_settings(self.server_index, variables=self.server_variables)
+
+ @host.setter
+ def host(self, value):
+ """Fix base path."""
+ self._base_path = value
+ self.server_index = None
diff --git a/python_openapi_client/fatcat_openapi_client/exceptions.py b/python_openapi_client/fatcat_openapi_client/exceptions.py
index 8d26659c..ac152e04 100644
--- a/python_openapi_client/fatcat_openapi_client/exceptions.py
+++ b/python_openapi_client/fatcat_openapi_client/exceptions.py
@@ -1,19 +1,14 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-import six
-
-
class OpenApiException(Exception):
"""The base exception class for all OpenAPIExceptions"""
@@ -65,6 +60,25 @@ class ApiValueError(OpenApiException, ValueError):
super(ApiValueError, self).__init__(full_msg)
+class ApiAttributeError(OpenApiException, AttributeError):
+ def __init__(self, msg, path_to_item=None):
+ """
+ Raised when an attribute reference or assignment fails.
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiAttributeError, self).__init__(full_msg)
+
+
class ApiKeyError(OpenApiException, KeyError):
def __init__(self, msg, path_to_item=None):
"""
@@ -98,7 +112,7 @@ class ApiException(OpenApiException):
def __str__(self):
"""Custom error messages for exception"""
- error_message = "({0})\n"\
+ error_message = "Status Code: {0}\n"\
"Reason: {1}\n".format(self.status, self.reason)
if self.headers:
error_message += "HTTP response headers: {0}\n".format(
@@ -110,11 +124,35 @@ class ApiException(OpenApiException):
return error_message
+class NotFoundException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(NotFoundException, self).__init__(status, reason, http_resp)
+
+
+class UnauthorizedException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(UnauthorizedException, self).__init__(status, reason, http_resp)
+
+
+class ForbiddenException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(ForbiddenException, self).__init__(status, reason, http_resp)
+
+
+class ServiceException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(ServiceException, self).__init__(status, reason, http_resp)
+
+
def render_path(path_to_item):
"""Returns a string representation of a path"""
result = ""
for pth in path_to_item:
- if isinstance(pth, six.integer_types):
+ if isinstance(pth, int):
result += "[{0}]".format(pth)
else:
result += "['{0}']".format(pth)
diff --git a/python_openapi_client/fatcat_openapi_client/model/__init__.py b/python_openapi_client/fatcat_openapi_client/model/__init__.py
new file mode 100644
index 00000000..2d61d1c9
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/__init__.py
@@ -0,0 +1,5 @@
+# we can not import model classes here because that would create a circular
+# reference which would not work in python2
+# do not import all models into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all models from one package, import them with
+# from fatcat_openapi_client.models import ModelA, ModelB
diff --git a/python_openapi_client/fatcat_openapi_client/model/auth_oidc.py b/python_openapi_client/fatcat_openapi_client/model/auth_oidc.py
new file mode 100644
index 00000000..65b1aa36
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/auth_oidc.py
@@ -0,0 +1,288 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class AuthOidc(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'provider': (str,), # noqa: E501
+ 'sub': (str,), # noqa: E501
+ 'iss': (str,), # noqa: E501
+ 'preferred_username': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'provider': 'provider', # noqa: E501
+ 'sub': 'sub', # noqa: E501
+ 'iss': 'iss', # noqa: E501
+ 'preferred_username': 'preferred_username', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, provider, sub, iss, preferred_username, *args, **kwargs): # noqa: E501
+ """AuthOidc - a model defined in OpenAPI
+
+ Args:
+ provider (str): Fatcat-specific short name (slug) for remote service being used for authentication.
+ sub (str): `SUB` from OIDC protocol. Usually a URL.
+ iss (str): `ISS` from OIDC protocol. Usually a stable account username, number, or identifier.
+ preferred_username (str): What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.provider = provider
+ self.sub = sub
+ self.iss = iss
+ self.preferred_username = preferred_username
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, provider, sub, iss, preferred_username, *args, **kwargs): # noqa: E501
+ """AuthOidc - a model defined in OpenAPI
+
+ Args:
+ provider (str): Fatcat-specific short name (slug) for remote service being used for authentication.
+ sub (str): `SUB` from OIDC protocol. Usually a URL.
+ iss (str): `ISS` from OIDC protocol. Usually a stable account username, number, or identifier.
+ preferred_username (str): What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.provider = provider
+ self.sub = sub
+ self.iss = iss
+ self.preferred_username = preferred_username
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/auth_oidc_result.py b/python_openapi_client/fatcat_openapi_client/model/auth_oidc_result.py
new file mode 100644
index 00000000..b52a9fdd
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/auth_oidc_result.py
@@ -0,0 +1,282 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editor import Editor
+ globals()['Editor'] = Editor
+
+
+class AuthOidcResult(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editor': (Editor,), # noqa: E501
+ 'token': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editor': 'editor', # noqa: E501
+ 'token': 'token', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editor, token, *args, **kwargs): # noqa: E501
+ """AuthOidcResult - a model defined in OpenAPI
+
+ Args:
+ editor (Editor):
+ token (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editor = editor
+ self.token = token
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editor, token, *args, **kwargs): # noqa: E501
+ """AuthOidcResult - a model defined in OpenAPI
+
+ Args:
+ editor (Editor):
+ token (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editor = editor
+ self.token = token
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/auth_token_result.py b/python_openapi_client/fatcat_openapi_client/model/auth_token_result.py
new file mode 100644
index 00000000..5b128d99
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/auth_token_result.py
@@ -0,0 +1,270 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class AuthTokenResult(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'token': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'token': 'token', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, token, *args, **kwargs): # noqa: E501
+ """AuthTokenResult - a model defined in OpenAPI
+
+ Args:
+ token (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.token = token
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, token, *args, **kwargs): # noqa: E501
+ """AuthTokenResult - a model defined in OpenAPI
+
+ Args:
+ token (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.token = token
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/changelog_entry.py b/python_openapi_client/fatcat_openapi_client/model/changelog_entry.py
new file mode 100644
index 00000000..a41354b9
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/changelog_entry.py
@@ -0,0 +1,292 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ globals()['Editgroup'] = Editgroup
+
+
+class ChangelogEntry(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'index': (int,), # noqa: E501
+ 'editgroup_id': (str,), # noqa: E501
+ 'timestamp': (datetime,), # noqa: E501
+ 'editgroup': (Editgroup,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'index': 'index', # noqa: E501
+ 'editgroup_id': 'editgroup_id', # noqa: E501
+ 'timestamp': 'timestamp', # noqa: E501
+ 'editgroup': 'editgroup', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, index, editgroup_id, timestamp, *args, **kwargs): # noqa: E501
+ """ChangelogEntry - a model defined in OpenAPI
+
+ Args:
+ index (int): Monotonically increasing sequence number of this changelog entry.
+ editgroup_id (str): Identifier of editgroup accepted/merged in this changelog entry.
+ timestamp (datetime): Date and time when the editgroup was accpeted.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editgroup (Editgroup): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.index = index
+ self.editgroup_id = editgroup_id
+ self.timestamp = timestamp
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, index, editgroup_id, timestamp, *args, **kwargs): # noqa: E501
+ """ChangelogEntry - a model defined in OpenAPI
+
+ Args:
+ index (int): Monotonically increasing sequence number of this changelog entry.
+ editgroup_id (str): Identifier of editgroup accepted/merged in this changelog entry.
+ timestamp (datetime): Date and time when the editgroup was accpeted.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editgroup (Editgroup): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.index = index
+ self.editgroup_id = editgroup_id
+ self.timestamp = timestamp
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/container_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/container_auto_batch.py
new file mode 100644
index 00000000..4eebebae
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/container_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.container_entity import ContainerEntity
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ globals()['ContainerEntity'] = ContainerEntity
+ globals()['Editgroup'] = Editgroup
+
+
+class ContainerAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([ContainerEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """ContainerAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([ContainerEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """ContainerAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([ContainerEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/container_entity.py b/python_openapi_client/fatcat_openapi_client/model/container_entity.py
new file mode 100644
index 00000000..7465cc88
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/container_entity.py
@@ -0,0 +1,346 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class ContainerEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('issnl',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ ('issne',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ ('issnp',): {
+ 'max_length': 9,
+ 'min_length': 9,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'name': (str,), # noqa: E501
+ 'container_type': (str,), # noqa: E501
+ 'publication_status': (str,), # noqa: E501
+ 'publisher': (str,), # noqa: E501
+ 'issnl': (str,), # noqa: E501
+ 'issne': (str,), # noqa: E501
+ 'issnp': (str,), # noqa: E501
+ 'wikidata_qid': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'name': 'name', # noqa: E501
+ 'container_type': 'container_type', # noqa: E501
+ 'publication_status': 'publication_status', # noqa: E501
+ 'publisher': 'publisher', # noqa: E501
+ 'issnl': 'issnl', # noqa: E501
+ 'issne': 'issne', # noqa: E501
+ 'issnp': 'issnp', # noqa: E501
+ 'wikidata_qid': 'wikidata_qid', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """ContainerEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ name (str): Name of the container (eg, Journal title). Required for entity creation.. [optional] # noqa: E501
+ container_type (str): Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types.. [optional] # noqa: E501
+ publication_status (str): Whether the container is active, discontinued, etc. [optional] # noqa: E501
+ publisher (str): Name of the organization or entity responsible for publication. Not the complete imprint/brand. . [optional] # noqa: E501
+ issnl (str): Linking ISSN number (ISSN-L). Should be valid and registered with issn.org. [optional] # noqa: E501
+ issne (str): Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org. [optional] # noqa: E501
+ issnp (str): Print ISSN number (ISSN-P). Should be valid and registered with issn.org. [optional] # noqa: E501
+ wikidata_qid (str): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ContainerEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ name (str): Name of the container (eg, Journal title). Required for entity creation.. [optional] # noqa: E501
+ container_type (str): Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types.. [optional] # noqa: E501
+ publication_status (str): Whether the container is active, discontinued, etc. [optional] # noqa: E501
+ publisher (str): Name of the organization or entity responsible for publication. Not the complete imprint/brand. . [optional] # noqa: E501
+ issnl (str): Linking ISSN number (ISSN-L). Should be valid and registered with issn.org. [optional] # noqa: E501
+ issne (str): Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org. [optional] # noqa: E501
+ issnp (str): Print ISSN number (ISSN-P). Should be valid and registered with issn.org. [optional] # noqa: E501
+ wikidata_qid (str): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/creator_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/creator_auto_batch.py
new file mode 100644
index 00000000..afb491f4
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/creator_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.creator_entity import CreatorEntity
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ globals()['CreatorEntity'] = CreatorEntity
+ globals()['Editgroup'] = Editgroup
+
+
+class CreatorAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([CreatorEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """CreatorAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([CreatorEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """CreatorAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([CreatorEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/creator_entity.py b/python_openapi_client/fatcat_openapi_client/model/creator_entity.py
new file mode 100644
index 00000000..3a6fa82e
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/creator_entity.py
@@ -0,0 +1,326 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class CreatorEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('orcid',): {
+ 'max_length': 19,
+ 'min_length': 19,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'display_name': (str,), # noqa: E501
+ 'given_name': (str,), # noqa: E501
+ 'surname': (str,), # noqa: E501
+ 'orcid': (str,), # noqa: E501
+ 'wikidata_qid': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'display_name': 'display_name', # noqa: E501
+ 'given_name': 'given_name', # noqa: E501
+ 'surname': 'surname', # noqa: E501
+ 'orcid': 'orcid', # noqa: E501
+ 'wikidata_qid': 'wikidata_qid', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """CreatorEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ display_name (str): Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. . [optional] # noqa: E501
+ given_name (str): In English commonly the first name, but ordering is context and culture specific. . [optional] # noqa: E501
+ surname (str): In English commonly the last, or family name, but ordering is context and culture specific. . [optional] # noqa: E501
+ orcid (str): ORCiD (https://orcid.org) identifier. [optional] # noqa: E501
+ wikidata_qid (str): Wikidata entity QID. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """CreatorEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ display_name (str): Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. . [optional] # noqa: E501
+ given_name (str): In English commonly the first name, but ordering is context and culture specific. . [optional] # noqa: E501
+ surname (str): In English commonly the last, or family name, but ordering is context and culture specific. . [optional] # noqa: E501
+ orcid (str): ORCiD (https://orcid.org) identifier. [optional] # noqa: E501
+ wikidata_qid (str): Wikidata entity QID. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/editgroup.py b/python_openapi_client/fatcat_openapi_client/model/editgroup.py
new file mode 100644
index 00000000..24ead4ab
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/editgroup.py
@@ -0,0 +1,318 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+ from fatcat_openapi_client.model.editgroup_edits import EditgroupEdits
+ from fatcat_openapi_client.model.editor import Editor
+ globals()['EditgroupAnnotation'] = EditgroupAnnotation
+ globals()['EditgroupEdits'] = EditgroupEdits
+ globals()['Editor'] = Editor
+
+
+class Editgroup(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('editor_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup_id': (str,), # noqa: E501
+ 'editor_id': (str,), # noqa: E501
+ 'editor': (Editor,), # noqa: E501
+ 'changelog_index': (int,), # noqa: E501
+ 'created': (datetime,), # noqa: E501
+ 'submitted': (datetime,), # noqa: E501
+ 'description': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'annotations': ([EditgroupAnnotation],), # noqa: E501
+ 'edits': (EditgroupEdits,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup_id': 'editgroup_id', # noqa: E501
+ 'editor_id': 'editor_id', # noqa: E501
+ 'editor': 'editor', # noqa: E501
+ 'changelog_index': 'changelog_index', # noqa: E501
+ 'created': 'created', # noqa: E501
+ 'submitted': 'submitted', # noqa: E501
+ 'description': 'description', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'annotations': 'annotations', # noqa: E501
+ 'edits': 'edits', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """Editgroup - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editgroup_id (str): Fatcat identifier for this editgroup. Assigned on creation. . [optional] # noqa: E501
+ editor_id (str): Fatcat identifier of editor that created this editgroup. . [optional] # noqa: E501
+ editor (Editor): [optional] # noqa: E501
+ changelog_index (int): For accepted/merged editgroups, the changelog index that the accept occurred at. WARNING: not populated in all contexts that an editgroup could be included in a response. . [optional] # noqa: E501
+ created (datetime): Timestamp when this editgroup was first created. . [optional] # noqa: E501
+ submitted (datetime): Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. . [optional] # noqa: E501
+ description (str): Comment describing the changes in this editgroup. Can be updated with PUT request. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. . [optional] # noqa: E501
+ annotations ([EditgroupAnnotation]): Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. . [optional] # noqa: E501
+ edits (EditgroupEdits): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Editgroup - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editgroup_id (str): Fatcat identifier for this editgroup. Assigned on creation. . [optional] # noqa: E501
+ editor_id (str): Fatcat identifier of editor that created this editgroup. . [optional] # noqa: E501
+ editor (Editor): [optional] # noqa: E501
+ changelog_index (int): For accepted/merged editgroups, the changelog index that the accept occurred at. WARNING: not populated in all contexts that an editgroup could be included in a response. . [optional] # noqa: E501
+ created (datetime): Timestamp when this editgroup was first created. . [optional] # noqa: E501
+ submitted (datetime): Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. . [optional] # noqa: E501
+ description (str): Comment describing the changes in this editgroup. Can be updated with PUT request. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. . [optional] # noqa: E501
+ annotations ([EditgroupAnnotation]): Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. . [optional] # noqa: E501
+ edits (EditgroupEdits): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/editgroup_annotation.py b/python_openapi_client/fatcat_openapi_client/model/editgroup_annotation.py
new file mode 100644
index 00000000..474d4882
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/editgroup_annotation.py
@@ -0,0 +1,306 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editor import Editor
+ globals()['Editor'] = Editor
+
+
+class EditgroupAnnotation(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('annotation_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('editor_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'annotation_id': (str,), # noqa: E501
+ 'editgroup_id': (str,), # noqa: E501
+ 'editor_id': (str,), # noqa: E501
+ 'editor': (Editor,), # noqa: E501
+ 'created': (datetime,), # noqa: E501
+ 'comment_markdown': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'annotation_id': 'annotation_id', # noqa: E501
+ 'editgroup_id': 'editgroup_id', # noqa: E501
+ 'editor_id': 'editor_id', # noqa: E501
+ 'editor': 'editor', # noqa: E501
+ 'created': 'created', # noqa: E501
+ 'comment_markdown': 'comment_markdown', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """EditgroupAnnotation - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ annotation_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ editgroup_id (str): Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. . [optional] # noqa: E501
+ editor_id (str): Defaults to editor created the annotation via POST request. . [optional] # noqa: E501
+ editor (Editor): [optional] # noqa: E501
+ created (datetime): Timestamp when annotation was first created. . [optional] # noqa: E501
+ comment_markdown (str): [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """EditgroupAnnotation - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ annotation_id (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ editgroup_id (str): Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. . [optional] # noqa: E501
+ editor_id (str): Defaults to editor created the annotation via POST request. . [optional] # noqa: E501
+ editor (Editor): [optional] # noqa: E501
+ created (datetime): Timestamp when annotation was first created. . [optional] # noqa: E501
+ comment_markdown (str): [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/editgroup_edits.py b/python_openapi_client/fatcat_openapi_client/model/editgroup_edits.py
new file mode 100644
index 00000000..e8d31ae0
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/editgroup_edits.py
@@ -0,0 +1,294 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.entity_edit import EntityEdit
+ globals()['EntityEdit'] = EntityEdit
+
+
+class EditgroupEdits(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'containers': ([EntityEdit],), # noqa: E501
+ 'creators': ([EntityEdit],), # noqa: E501
+ 'files': ([EntityEdit],), # noqa: E501
+ 'filesets': ([EntityEdit],), # noqa: E501
+ 'webcaptures': ([EntityEdit],), # noqa: E501
+ 'releases': ([EntityEdit],), # noqa: E501
+ 'works': ([EntityEdit],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'containers': 'containers', # noqa: E501
+ 'creators': 'creators', # noqa: E501
+ 'files': 'files', # noqa: E501
+ 'filesets': 'filesets', # noqa: E501
+ 'webcaptures': 'webcaptures', # noqa: E501
+ 'releases': 'releases', # noqa: E501
+ 'works': 'works', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """EditgroupEdits - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ containers ([EntityEdit]): [optional] # noqa: E501
+ creators ([EntityEdit]): [optional] # noqa: E501
+ files ([EntityEdit]): [optional] # noqa: E501
+ filesets ([EntityEdit]): [optional] # noqa: E501
+ webcaptures ([EntityEdit]): [optional] # noqa: E501
+ releases ([EntityEdit]): [optional] # noqa: E501
+ works ([EntityEdit]): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """EditgroupEdits - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ containers ([EntityEdit]): [optional] # noqa: E501
+ creators ([EntityEdit]): [optional] # noqa: E501
+ files ([EntityEdit]): [optional] # noqa: E501
+ filesets ([EntityEdit]): [optional] # noqa: E501
+ webcaptures ([EntityEdit]): [optional] # noqa: E501
+ releases ([EntityEdit]): [optional] # noqa: E501
+ works ([EntityEdit]): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/editor.py b/python_openapi_client/fatcat_openapi_client/model/editor.py
new file mode 100644
index 00000000..5ad695f6
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/editor.py
@@ -0,0 +1,290 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class Editor(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('editor_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'username': (str,), # noqa: E501
+ 'editor_id': (str,), # noqa: E501
+ 'is_admin': (bool,), # noqa: E501
+ 'is_bot': (bool,), # noqa: E501
+ 'is_active': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'username': 'username', # noqa: E501
+ 'editor_id': 'editor_id', # noqa: E501
+ 'is_admin': 'is_admin', # noqa: E501
+ 'is_bot': 'is_bot', # noqa: E501
+ 'is_active': 'is_active', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, username, *args, **kwargs): # noqa: E501
+ """Editor - a model defined in OpenAPI
+
+ Args:
+ username (str): Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifier.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editor_id (str): Fatcat identifier for the editor. Can not be changed. . [optional] # noqa: E501
+ is_admin (bool): Whether this editor has the `admin` role. . [optional] # noqa: E501
+ is_bot (bool): Whether this editor is a bot (as opposed to a human making manual edits) . [optional] # noqa: E501
+ is_active (bool): Whether this editor's account is enabled (if not API tokens and web logins will not work). . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.username = username
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, username, *args, **kwargs): # noqa: E501
+ """Editor - a model defined in OpenAPI
+
+ Args:
+ username (str): Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifier.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ editor_id (str): Fatcat identifier for the editor. Can not be changed. . [optional] # noqa: E501
+ is_admin (bool): Whether this editor has the `admin` role. . [optional] # noqa: E501
+ is_bot (bool): Whether this editor is a bot (as opposed to a human making manual edits) . [optional] # noqa: E501
+ is_active (bool): Whether this editor's account is enabled (if not API tokens and web logins will not work). . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.username = username
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/entity_edit.py b/python_openapi_client/fatcat_openapi_client/model/entity_edit.py
new file mode 100644
index 00000000..7ef2b61e
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/entity_edit.py
@@ -0,0 +1,322 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class EntityEdit(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('edit_id',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('editgroup_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('prev_revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect_ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'edit_id': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'editgroup_id': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'prev_revision': (str,), # noqa: E501
+ 'redirect_ident': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'edit_id': 'edit_id', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'editgroup_id': 'editgroup_id', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'prev_revision': 'prev_revision', # noqa: E501
+ 'redirect_ident': 'redirect_ident', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, edit_id, ident, editgroup_id, *args, **kwargs): # noqa: E501
+ """EntityEdit - a model defined in OpenAPI
+
+ Args:
+ edit_id (str): Unique UUID for this specific edit object.
+ ident (str): Fatcat identifier of the entity this edit is mutating.
+ editgroup_id (str): Editgroup identifier that this edit is part of.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ revision (str): Entity revision that this edit will set the entity to. May be `null` in the case of deletions. . [optional] # noqa: E501
+ prev_revision (str): Revision of entity just before this edit. May be used in the future to prevent edit race conditions. . [optional] # noqa: E501
+ redirect_ident (str): When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.edit_id = edit_id
+ self.ident = ident
+ self.editgroup_id = editgroup_id
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, edit_id, ident, editgroup_id, *args, **kwargs): # noqa: E501
+ """EntityEdit - a model defined in OpenAPI
+
+ Args:
+ edit_id (str): Unique UUID for this specific edit object.
+ ident (str): Fatcat identifier of the entity this edit is mutating.
+ editgroup_id (str): Editgroup identifier that this edit is part of.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ revision (str): Entity revision that this edit will set the entity to. May be `null` in the case of deletions. . [optional] # noqa: E501
+ prev_revision (str): Revision of entity just before this edit. May be used in the future to prevent edit race conditions. . [optional] # noqa: E501
+ redirect_ident (str): When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.edit_id = edit_id
+ self.ident = ident
+ self.editgroup_id = editgroup_id
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/entity_history_entry.py b/python_openapi_client/fatcat_openapi_client/model/entity_history_entry.py
new file mode 100644
index 00000000..bd8fb57d
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/entity_history_entry.py
@@ -0,0 +1,292 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.entity_edit import EntityEdit
+ globals()['ChangelogEntry'] = ChangelogEntry
+ globals()['Editgroup'] = Editgroup
+ globals()['EntityEdit'] = EntityEdit
+
+
+class EntityHistoryEntry(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'edit': (EntityEdit,), # noqa: E501
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'changelog_entry': (ChangelogEntry,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'edit': 'edit', # noqa: E501
+ 'editgroup': 'editgroup', # noqa: E501
+ 'changelog_entry': 'changelog_entry', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, edit, editgroup, changelog_entry, *args, **kwargs): # noqa: E501
+ """EntityHistoryEntry - a model defined in OpenAPI
+
+ Args:
+ edit (EntityEdit):
+ editgroup (Editgroup):
+ changelog_entry (ChangelogEntry):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.edit = edit
+ self.editgroup = editgroup
+ self.changelog_entry = changelog_entry
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, edit, editgroup, changelog_entry, *args, **kwargs): # noqa: E501
+ """EntityHistoryEntry - a model defined in OpenAPI
+
+ Args:
+ edit (EntityEdit):
+ editgroup (Editgroup):
+ changelog_entry (ChangelogEntry):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.edit = edit
+ self.editgroup = editgroup
+ self.changelog_entry = changelog_entry
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/error_response.py b/python_openapi_client/fatcat_openapi_client/model/error_response.py
new file mode 100644
index 00000000..312aa09f
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/error_response.py
@@ -0,0 +1,282 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class ErrorResponse(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'success': (bool,), # noqa: E501
+ 'error': (str,), # noqa: E501
+ 'message': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'success': 'success', # noqa: E501
+ 'error': 'error', # noqa: E501
+ 'message': 'message', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, success, error, message, *args, **kwargs): # noqa: E501
+ """ErrorResponse - a model defined in OpenAPI
+
+ Args:
+ success (bool):
+ error (str):
+ message (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.success = success
+ self.error = error
+ self.message = message
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, success, error, message, *args, **kwargs): # noqa: E501
+ """ErrorResponse - a model defined in OpenAPI
+
+ Args:
+ success (bool):
+ error (str):
+ message (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.success = success
+ self.error = error
+ self.message = message
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/file_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/file_auto_batch.py
new file mode 100644
index 00000000..3ed17b98
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/file_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.file_entity import FileEntity
+ globals()['Editgroup'] = Editgroup
+ globals()['FileEntity'] = FileEntity
+
+
+class FileAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([FileEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """FileAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([FileEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """FileAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([FileEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/file_entity.py b/python_openapi_client/fatcat_openapi_client/model/file_entity.py
new file mode 100644
index 00000000..c7b2fba2
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/file_entity.py
@@ -0,0 +1,358 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.file_url import FileUrl
+ from fatcat_openapi_client.model.release_entity import ReleaseEntity
+ globals()['FileUrl'] = FileUrl
+ globals()['ReleaseEntity'] = ReleaseEntity
+
+
+class FileEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('md5',): {
+ 'max_length': 32,
+ 'min_length': 32,
+ },
+ ('sha1',): {
+ 'max_length': 40,
+ 'min_length': 40,
+ },
+ ('sha256',): {
+ 'max_length': 64,
+ 'min_length': 64,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'size': (int,), # noqa: E501
+ 'md5': (str,), # noqa: E501
+ 'sha1': (str,), # noqa: E501
+ 'sha256': (str,), # noqa: E501
+ 'urls': ([FileUrl],), # noqa: E501
+ 'mimetype': (str,), # noqa: E501
+ 'content_scope': (str,), # noqa: E501
+ 'release_ids': ([str],), # noqa: E501
+ 'releases': ([ReleaseEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'size': 'size', # noqa: E501
+ 'md5': 'md5', # noqa: E501
+ 'sha1': 'sha1', # noqa: E501
+ 'sha256': 'sha256', # noqa: E501
+ 'urls': 'urls', # noqa: E501
+ 'mimetype': 'mimetype', # noqa: E501
+ 'content_scope': 'content_scope', # noqa: E501
+ 'release_ids': 'release_ids', # noqa: E501
+ 'releases': 'releases', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """FileEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ size (int): Size of file in bytes. Non-zero.. [optional] # noqa: E501
+ md5 (str): MD5 hash of data, in hex encoding. [optional] # noqa: E501
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ urls ([FileUrl]): [optional] # noqa: E501
+ mimetype (str): [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """FileEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ size (int): Size of file in bytes. Non-zero.. [optional] # noqa: E501
+ md5 (str): MD5 hash of data, in hex encoding. [optional] # noqa: E501
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ urls ([FileUrl]): [optional] # noqa: E501
+ mimetype (str): [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/file_url.py b/python_openapi_client/fatcat_openapi_client/model/file_url.py
new file mode 100644
index 00000000..3345d0b1
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/file_url.py
@@ -0,0 +1,276 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class FileUrl(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'url': (str,), # noqa: E501
+ 'rel': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'url': 'url', # noqa: E501
+ 'rel': 'rel', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, url, rel, *args, **kwargs): # noqa: E501
+ """FileUrl - a model defined in OpenAPI
+
+ Args:
+ url (str): URL/URI pointing directly to a machine retrievable copy of this exact file.
+ rel (str): Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, url, rel, *args, **kwargs): # noqa: E501
+ """FileUrl - a model defined in OpenAPI
+
+ Args:
+ url (str): URL/URI pointing directly to a machine retrievable copy of this exact file.
+ rel (str): Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/fileset_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/fileset_auto_batch.py
new file mode 100644
index 00000000..1f14e597
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/fileset_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+ globals()['Editgroup'] = Editgroup
+ globals()['FilesetEntity'] = FilesetEntity
+
+
+class FilesetAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([FilesetEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """FilesetAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([FilesetEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """FilesetAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([FilesetEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/fileset_entity.py b/python_openapi_client/fatcat_openapi_client/model/fileset_entity.py
new file mode 100644
index 00000000..aa1fce99
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/fileset_entity.py
@@ -0,0 +1,332 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.fileset_file import FilesetFile
+ from fatcat_openapi_client.model.fileset_url import FilesetUrl
+ from fatcat_openapi_client.model.release_entity import ReleaseEntity
+ globals()['FilesetFile'] = FilesetFile
+ globals()['FilesetUrl'] = FilesetUrl
+ globals()['ReleaseEntity'] = ReleaseEntity
+
+
+class FilesetEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'content_scope': (str,), # noqa: E501
+ 'manifest': ([FilesetFile],), # noqa: E501
+ 'urls': ([FilesetUrl],), # noqa: E501
+ 'release_ids': ([str],), # noqa: E501
+ 'releases': ([ReleaseEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'content_scope': 'content_scope', # noqa: E501
+ 'manifest': 'manifest', # noqa: E501
+ 'urls': 'urls', # noqa: E501
+ 'release_ids': 'release_ids', # noqa: E501
+ 'releases': 'releases', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """FilesetEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ manifest ([FilesetFile]): [optional] # noqa: E501
+ urls ([FilesetUrl]): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """FilesetEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ manifest ([FilesetFile]): [optional] # noqa: E501
+ urls ([FilesetUrl]): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/fileset_file.py b/python_openapi_client/fatcat_openapi_client/model/fileset_file.py
new file mode 100644
index 00000000..80967e37
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/fileset_file.py
@@ -0,0 +1,308 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class FilesetFile(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('md5',): {
+ 'max_length': 32,
+ 'min_length': 32,
+ },
+ ('sha1',): {
+ 'max_length': 40,
+ 'min_length': 40,
+ },
+ ('sha256',): {
+ 'max_length': 64,
+ 'min_length': 64,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'path': (str,), # noqa: E501
+ 'size': (int,), # noqa: E501
+ 'md5': (str,), # noqa: E501
+ 'sha1': (str,), # noqa: E501
+ 'sha256': (str,), # noqa: E501
+ 'mimetype': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'path': 'path', # noqa: E501
+ 'size': 'size', # noqa: E501
+ 'md5': 'md5', # noqa: E501
+ 'sha1': 'sha1', # noqa: E501
+ 'sha256': 'sha256', # noqa: E501
+ 'mimetype': 'mimetype', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, path, size, *args, **kwargs): # noqa: E501
+ """FilesetFile - a model defined in OpenAPI
+
+ Args:
+ path (str): Path name of file within this fileset (eg, directory)
+ size (int): File size in bytes
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ md5 (str): MD5 hash of data, in hex encoding. [optional] # noqa: E501
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ mimetype (str): [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.path = path
+ self.size = size
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, path, size, *args, **kwargs): # noqa: E501
+ """FilesetFile - a model defined in OpenAPI
+
+ Args:
+ path (str): Path name of file within this fileset (eg, directory)
+ size (int): File size in bytes
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ md5 (str): MD5 hash of data, in hex encoding. [optional] # noqa: E501
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ mimetype (str): [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.path = path
+ self.size = size
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/fileset_url.py b/python_openapi_client/fatcat_openapi_client/model/fileset_url.py
new file mode 100644
index 00000000..53d6b996
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/fileset_url.py
@@ -0,0 +1,276 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class FilesetUrl(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'url': (str,), # noqa: E501
+ 'rel': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'url': 'url', # noqa: E501
+ 'rel': 'rel', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, url, rel, *args, **kwargs): # noqa: E501
+ """FilesetUrl - a model defined in OpenAPI
+
+ Args:
+ url (str):
+ rel (str): Indicates type of host this URL points to. See guide for list of acceptable values.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, url, rel, *args, **kwargs): # noqa: E501
+ """FilesetUrl - a model defined in OpenAPI
+
+ Args:
+ url (str):
+ rel (str): Indicates type of host this URL points to. See guide for list of acceptable values.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_abstract.py b/python_openapi_client/fatcat_openapi_client/model/release_abstract.py
new file mode 100644
index 00000000..23589445
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_abstract.py
@@ -0,0 +1,280 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class ReleaseAbstract(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('sha1',): {
+ 'max_length': 40,
+ 'min_length': 40,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'sha1': (str,), # noqa: E501
+ 'content': (str,), # noqa: E501
+ 'mimetype': (str,), # noqa: E501
+ 'lang': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'sha1': 'sha1', # noqa: E501
+ 'content': 'content', # noqa: E501
+ 'mimetype': 'mimetype', # noqa: E501
+ 'lang': 'lang', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """ReleaseAbstract - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ content (str): Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. . [optional] # noqa: E501
+ mimetype (str): Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. . [optional] # noqa: E501
+ lang (str): ISO language code of the abstract. Same semantics as release `language` field. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ReleaseAbstract - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ sha1 (str): SHA-1 hash of data, in hex encoding. [optional] # noqa: E501
+ content (str): Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. . [optional] # noqa: E501
+ mimetype (str): Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. . [optional] # noqa: E501
+ lang (str): ISO language code of the abstract. Same semantics as release `language` field. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/release_auto_batch.py
new file mode 100644
index 00000000..0ed29b97
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.release_entity import ReleaseEntity
+ globals()['Editgroup'] = Editgroup
+ globals()['ReleaseEntity'] = ReleaseEntity
+
+
+class ReleaseAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([ReleaseEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """ReleaseAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([ReleaseEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """ReleaseAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([ReleaseEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_contrib.py b/python_openapi_client/fatcat_openapi_client/model/release_contrib.py
new file mode 100644
index 00000000..96a80f79
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_contrib.py
@@ -0,0 +1,306 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.creator_entity import CreatorEntity
+ globals()['CreatorEntity'] = CreatorEntity
+
+
+class ReleaseContrib(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('creator_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'index': (int,), # noqa: E501
+ 'creator_id': (str,), # noqa: E501
+ 'creator': (CreatorEntity,), # noqa: E501
+ 'raw_name': (str,), # noqa: E501
+ 'given_name': (str,), # noqa: E501
+ 'surname': (str,), # noqa: E501
+ 'role': (str,), # noqa: E501
+ 'raw_affiliation': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'index': 'index', # noqa: E501
+ 'creator_id': 'creator_id', # noqa: E501
+ 'creator': 'creator', # noqa: E501
+ 'raw_name': 'raw_name', # noqa: E501
+ 'given_name': 'given_name', # noqa: E501
+ 'surname': 'surname', # noqa: E501
+ 'role': 'role', # noqa: E501
+ 'raw_affiliation': 'raw_affiliation', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """ReleaseContrib - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ index (int): Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. . [optional] # noqa: E501
+ creator_id (str): If known, indicates the creator entity this contribution was made by. . [optional] # noqa: E501
+ creator (CreatorEntity): [optional] # noqa: E501
+ raw_name (str): Full name of the contributor as typeset in the release. . [optional] # noqa: E501
+ given_name (str): In English commonly the first name, but ordering is context and culture specific. . [optional] # noqa: E501
+ surname (str): In English commonly the last, or family name, but ordering is context and culture specific. . [optional] # noqa: E501
+ role (str): Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. . [optional] # noqa: E501
+ raw_affiliation (str): Raw affiliation string as displayed in text. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ReleaseContrib - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ index (int): Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. . [optional] # noqa: E501
+ creator_id (str): If known, indicates the creator entity this contribution was made by. . [optional] # noqa: E501
+ creator (CreatorEntity): [optional] # noqa: E501
+ raw_name (str): Full name of the contributor as typeset in the release. . [optional] # noqa: E501
+ given_name (str): In English commonly the first name, but ordering is context and culture specific. . [optional] # noqa: E501
+ surname (str): In English commonly the last, or family name, but ordering is context and culture specific. . [optional] # noqa: E501
+ role (str): Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. . [optional] # noqa: E501
+ raw_affiliation (str): Raw affiliation string as displayed in text. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_entity.py b/python_openapi_client/fatcat_openapi_client/model/release_entity.py
new file mode 100644
index 00000000..1f0e55c0
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_entity.py
@@ -0,0 +1,440 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.container_entity import ContainerEntity
+ from fatcat_openapi_client.model.file_entity import FileEntity
+ from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+ from fatcat_openapi_client.model.release_abstract import ReleaseAbstract
+ from fatcat_openapi_client.model.release_contrib import ReleaseContrib
+ from fatcat_openapi_client.model.release_ext_ids import ReleaseExtIds
+ from fatcat_openapi_client.model.release_ref import ReleaseRef
+ from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+ globals()['ContainerEntity'] = ContainerEntity
+ globals()['FileEntity'] = FileEntity
+ globals()['FilesetEntity'] = FilesetEntity
+ globals()['ReleaseAbstract'] = ReleaseAbstract
+ globals()['ReleaseContrib'] = ReleaseContrib
+ globals()['ReleaseExtIds'] = ReleaseExtIds
+ globals()['ReleaseRef'] = ReleaseRef
+ globals()['WebcaptureEntity'] = WebcaptureEntity
+
+
+class ReleaseEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'ext_ids': (ReleaseExtIds,), # noqa: E501
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'title': (str,), # noqa: E501
+ 'subtitle': (str,), # noqa: E501
+ 'original_title': (str,), # noqa: E501
+ 'work_id': (str,), # noqa: E501
+ 'container': (ContainerEntity,), # noqa: E501
+ 'files': ([FileEntity],), # noqa: E501
+ 'filesets': ([FilesetEntity],), # noqa: E501
+ 'webcaptures': ([WebcaptureEntity],), # noqa: E501
+ 'container_id': (str,), # noqa: E501
+ 'release_type': (str,), # noqa: E501
+ 'release_stage': (str,), # noqa: E501
+ 'release_date': (date,), # noqa: E501
+ 'release_year': (int,), # noqa: E501
+ 'withdrawn_status': (str,), # noqa: E501
+ 'withdrawn_date': (date,), # noqa: E501
+ 'withdrawn_year': (int,), # noqa: E501
+ 'volume': (str,), # noqa: E501
+ 'issue': (str,), # noqa: E501
+ 'pages': (str,), # noqa: E501
+ 'number': (str,), # noqa: E501
+ 'version': (str,), # noqa: E501
+ 'publisher': (str,), # noqa: E501
+ 'language': (str,), # noqa: E501
+ 'license_slug': (str,), # noqa: E501
+ 'contribs': ([ReleaseContrib],), # noqa: E501
+ 'refs': ([ReleaseRef],), # noqa: E501
+ 'abstracts': ([ReleaseAbstract],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'ext_ids': 'ext_ids', # noqa: E501
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'title': 'title', # noqa: E501
+ 'subtitle': 'subtitle', # noqa: E501
+ 'original_title': 'original_title', # noqa: E501
+ 'work_id': 'work_id', # noqa: E501
+ 'container': 'container', # noqa: E501
+ 'files': 'files', # noqa: E501
+ 'filesets': 'filesets', # noqa: E501
+ 'webcaptures': 'webcaptures', # noqa: E501
+ 'container_id': 'container_id', # noqa: E501
+ 'release_type': 'release_type', # noqa: E501
+ 'release_stage': 'release_stage', # noqa: E501
+ 'release_date': 'release_date', # noqa: E501
+ 'release_year': 'release_year', # noqa: E501
+ 'withdrawn_status': 'withdrawn_status', # noqa: E501
+ 'withdrawn_date': 'withdrawn_date', # noqa: E501
+ 'withdrawn_year': 'withdrawn_year', # noqa: E501
+ 'volume': 'volume', # noqa: E501
+ 'issue': 'issue', # noqa: E501
+ 'pages': 'pages', # noqa: E501
+ 'number': 'number', # noqa: E501
+ 'version': 'version', # noqa: E501
+ 'publisher': 'publisher', # noqa: E501
+ 'language': 'language', # noqa: E501
+ 'license_slug': 'license_slug', # noqa: E501
+ 'contribs': 'contribs', # noqa: E501
+ 'refs': 'refs', # noqa: E501
+ 'abstracts': 'abstracts', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, ext_ids, *args, **kwargs): # noqa: E501
+ """ReleaseEntity - a model defined in OpenAPI
+
+ Args:
+ ext_ids (ReleaseExtIds):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ title (str): Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. . [optional] # noqa: E501
+ subtitle (str): Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. . [optional] # noqa: E501
+ original_title (str): Title in original language if `title` field has been translated. See guide for details. . [optional] # noqa: E501
+ work_id (str): Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. . [optional] # noqa: E501
+ container (ContainerEntity): [optional] # noqa: E501
+ files ([FileEntity]): Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ filesets ([FilesetEntity]): Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ webcaptures ([WebcaptureEntity]): Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ container_id (str): Used to link this release to a container entity that the release was published as part of. . [optional] # noqa: E501
+ release_type (str): \"Type\" or \"medium\" that this release is published as. See guide for valid values. . [optional] # noqa: E501
+ release_stage (str): The stage of publication of this specific release. See guide for valid values and semantics. . [optional] # noqa: E501
+ release_date (date): Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. . [optional] # noqa: E501
+ release_year (int): Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. . [optional] # noqa: E501
+ withdrawn_status (str): Type of withdrawal or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). . [optional] # noqa: E501
+ withdrawn_date (date): Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. . [optional] # noqa: E501
+ withdrawn_year (int): Year corresponding with `withdrawn_date` like `release_year`/`release_date`. . [optional] # noqa: E501
+ volume (str): Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. . [optional] # noqa: E501
+ issue (str): Issue number of volume/container that this release was published in. Sometimes corresponds to a month number in the year, but can be any string. See guide. . [optional] # noqa: E501
+ pages (str): Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. . [optional] # noqa: E501
+ number (str): For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. . [optional] # noqa: E501
+ version (str): For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. . [optional] # noqa: E501
+ publisher (str): Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. . [optional] # noqa: E501
+ language (str): Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. . [optional] # noqa: E501
+ license_slug (str): Short string (slug) name of license under which release is openly published (if applicable). . [optional] # noqa: E501
+ contribs ([ReleaseContrib]): [optional] # noqa: E501
+ refs ([ReleaseRef]): [optional] # noqa: E501
+ abstracts ([ReleaseAbstract]): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.ext_ids = ext_ids
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, ext_ids, *args, **kwargs): # noqa: E501
+ """ReleaseEntity - a model defined in OpenAPI
+
+ Args:
+ ext_ids (ReleaseExtIds):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ title (str): Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. . [optional] # noqa: E501
+ subtitle (str): Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. . [optional] # noqa: E501
+ original_title (str): Title in original language if `title` field has been translated. See guide for details. . [optional] # noqa: E501
+ work_id (str): Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. . [optional] # noqa: E501
+ container (ContainerEntity): [optional] # noqa: E501
+ files ([FileEntity]): Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ filesets ([FilesetEntity]): Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ webcaptures ([WebcaptureEntity]): Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. . [optional] # noqa: E501
+ container_id (str): Used to link this release to a container entity that the release was published as part of. . [optional] # noqa: E501
+ release_type (str): \"Type\" or \"medium\" that this release is published as. See guide for valid values. . [optional] # noqa: E501
+ release_stage (str): The stage of publication of this specific release. See guide for valid values and semantics. . [optional] # noqa: E501
+ release_date (date): Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. . [optional] # noqa: E501
+ release_year (int): Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. . [optional] # noqa: E501
+ withdrawn_status (str): Type of withdrawal or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). . [optional] # noqa: E501
+ withdrawn_date (date): Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. . [optional] # noqa: E501
+ withdrawn_year (int): Year corresponding with `withdrawn_date` like `release_year`/`release_date`. . [optional] # noqa: E501
+ volume (str): Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. . [optional] # noqa: E501
+ issue (str): Issue number of volume/container that this release was published in. Sometimes corresponds to a month number in the year, but can be any string. See guide. . [optional] # noqa: E501
+ pages (str): Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. . [optional] # noqa: E501
+ number (str): For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. . [optional] # noqa: E501
+ version (str): For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. . [optional] # noqa: E501
+ publisher (str): Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. . [optional] # noqa: E501
+ language (str): Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. . [optional] # noqa: E501
+ license_slug (str): Short string (slug) name of license under which release is openly published (if applicable). . [optional] # noqa: E501
+ contribs ([ReleaseContrib]): [optional] # noqa: E501
+ refs ([ReleaseRef]): [optional] # noqa: E501
+ abstracts ([ReleaseAbstract]): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.ext_ids = ext_ids
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_ext_ids.py b/python_openapi_client/fatcat_openapi_client/model/release_ext_ids.py
new file mode 100644
index 00000000..f612ca45
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_ext_ids.py
@@ -0,0 +1,316 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class ReleaseExtIds(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'doi': (str,), # noqa: E501
+ 'wikidata_qid': (str,), # noqa: E501
+ 'isbn13': (str,), # noqa: E501
+ 'pmid': (str,), # noqa: E501
+ 'pmcid': (str,), # noqa: E501
+ 'core': (str,), # noqa: E501
+ 'arxiv': (str,), # noqa: E501
+ 'jstor': (str,), # noqa: E501
+ 'ark': (str,), # noqa: E501
+ 'mag': (str,), # noqa: E501
+ 'doaj': (str,), # noqa: E501
+ 'dblp': (str,), # noqa: E501
+ 'oai': (str,), # noqa: E501
+ 'hdl': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'doi': 'doi', # noqa: E501
+ 'wikidata_qid': 'wikidata_qid', # noqa: E501
+ 'isbn13': 'isbn13', # noqa: E501
+ 'pmid': 'pmid', # noqa: E501
+ 'pmcid': 'pmcid', # noqa: E501
+ 'core': 'core', # noqa: E501
+ 'arxiv': 'arxiv', # noqa: E501
+ 'jstor': 'jstor', # noqa: E501
+ 'ark': 'ark', # noqa: E501
+ 'mag': 'mag', # noqa: E501
+ 'doaj': 'doaj', # noqa: E501
+ 'dblp': 'dblp', # noqa: E501
+ 'oai': 'oai', # noqa: E501
+ 'hdl': 'hdl', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """ReleaseExtIds - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ doi (str): Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ . [optional] # noqa: E501
+ wikidata_qid (str): Wikidata entity QID. [optional] # noqa: E501
+ isbn13 (str): ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. . [optional] # noqa: E501
+ pmid (str): PubMed Identifier. [optional] # noqa: E501
+ pmcid (str): PubMed Central Identifier. [optional] # noqa: E501
+ core (str): CORE (https://core.ac.uk) identifier. [optional] # noqa: E501
+ arxiv (str): arXiv (https://arxiv.org) identifier; must include version. [optional] # noqa: E501
+ jstor (str): JSTOR work identifier. [optional] # noqa: E501
+ ark (str): ARK identifier. [optional] # noqa: E501
+ mag (str): Microsoft Academic Graph identifier. [optional] # noqa: E501
+ doaj (str): DOAJ article-level identifier. [optional] # noqa: E501
+ dblp (str): dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings. [optional] # noqa: E501
+ oai (str): OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs). [optional] # noqa: E501
+ hdl (str): Handle identifier. Do not put DOIs in this field. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ReleaseExtIds - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ doi (str): Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ . [optional] # noqa: E501
+ wikidata_qid (str): Wikidata entity QID. [optional] # noqa: E501
+ isbn13 (str): ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. . [optional] # noqa: E501
+ pmid (str): PubMed Identifier. [optional] # noqa: E501
+ pmcid (str): PubMed Central Identifier. [optional] # noqa: E501
+ core (str): CORE (https://core.ac.uk) identifier. [optional] # noqa: E501
+ arxiv (str): arXiv (https://arxiv.org) identifier; must include version. [optional] # noqa: E501
+ jstor (str): JSTOR work identifier. [optional] # noqa: E501
+ ark (str): ARK identifier. [optional] # noqa: E501
+ mag (str): Microsoft Academic Graph identifier. [optional] # noqa: E501
+ doaj (str): DOAJ article-level identifier. [optional] # noqa: E501
+ dblp (str): dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings. [optional] # noqa: E501
+ oai (str): OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs). [optional] # noqa: E501
+ hdl (str): Handle identifier. Do not put DOIs in this field. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/release_ref.py b/python_openapi_client/fatcat_openapi_client/model/release_ref.py
new file mode 100644
index 00000000..50aed6e8
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/release_ref.py
@@ -0,0 +1,296 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class ReleaseRef(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('target_release_id',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'index': (int,), # noqa: E501
+ 'target_release_id': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'key': (str,), # noqa: E501
+ 'year': (int,), # noqa: E501
+ 'container_name': (str,), # noqa: E501
+ 'title': (str,), # noqa: E501
+ 'locator': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'index': 'index', # noqa: E501
+ 'target_release_id': 'target_release_id', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'key': 'key', # noqa: E501
+ 'year': 'year', # noqa: E501
+ 'container_name': 'container_name', # noqa: E501
+ 'title': 'title', # noqa: E501
+ 'locator': 'locator', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """ReleaseRef - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ index (int): Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. . [optional] # noqa: E501
+ target_release_id (str): Optional, fatcat identifier of release entity that this reference is citing. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. . [optional] # noqa: E501
+ key (str): Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. . [optional] # noqa: E501
+ year (int): Year that the cited work was published in. . [optional] # noqa: E501
+ container_name (str): Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. . [optional] # noqa: E501
+ title (str): Name of the work being cited.. [optional] # noqa: E501
+ locator (str): Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ReleaseRef - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ index (int): Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. . [optional] # noqa: E501
+ target_release_id (str): Optional, fatcat identifier of release entity that this reference is citing. . [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. . [optional] # noqa: E501
+ key (str): Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. . [optional] # noqa: E501
+ year (int): Year that the cited work was published in. . [optional] # noqa: E501
+ container_name (str): Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. . [optional] # noqa: E501
+ title (str): Name of the work being cited.. [optional] # noqa: E501
+ locator (str): Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/success.py b/python_openapi_client/fatcat_openapi_client/model/success.py
new file mode 100644
index 00000000..4d3af0fb
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/success.py
@@ -0,0 +1,276 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class Success(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'success': (bool,), # noqa: E501
+ 'message': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'success': 'success', # noqa: E501
+ 'message': 'message', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, success, message, *args, **kwargs): # noqa: E501
+ """Success - a model defined in OpenAPI
+
+ Args:
+ success (bool):
+ message (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.success = success
+ self.message = message
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, success, message, *args, **kwargs): # noqa: E501
+ """Success - a model defined in OpenAPI
+
+ Args:
+ success (bool):
+ message (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.success = success
+ self.message = message
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/webcapture_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/webcapture_auto_batch.py
new file mode 100644
index 00000000..f5401d96
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/webcapture_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+ globals()['Editgroup'] = Editgroup
+ globals()['WebcaptureEntity'] = WebcaptureEntity
+
+
+class WebcaptureAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([WebcaptureEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """WebcaptureAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([WebcaptureEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """WebcaptureAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([WebcaptureEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/webcapture_cdx_line.py b/python_openapi_client/fatcat_openapi_client/model/webcapture_cdx_line.py
new file mode 100644
index 00000000..f92c7a14
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/webcapture_cdx_line.py
@@ -0,0 +1,312 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class WebcaptureCdxLine(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('sha1',): {
+ 'max_length': 40,
+ 'min_length': 40,
+ },
+ ('sha256',): {
+ 'max_length': 64,
+ 'min_length': 64,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'surt': (str,), # noqa: E501
+ 'timestamp': (datetime,), # noqa: E501
+ 'url': (str,), # noqa: E501
+ 'sha1': (str,), # noqa: E501
+ 'mimetype': (str,), # noqa: E501
+ 'status_code': (int,), # noqa: E501
+ 'size': (int,), # noqa: E501
+ 'sha256': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'surt': 'surt', # noqa: E501
+ 'timestamp': 'timestamp', # noqa: E501
+ 'url': 'url', # noqa: E501
+ 'sha1': 'sha1', # noqa: E501
+ 'mimetype': 'mimetype', # noqa: E501
+ 'status_code': 'status_code', # noqa: E501
+ 'size': 'size', # noqa: E501
+ 'sha256': 'sha256', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, surt, timestamp, url, sha1, *args, **kwargs): # noqa: E501
+ """WebcaptureCdxLine - a model defined in OpenAPI
+
+ Args:
+ surt (str): \"Sortable URL\" format. See guide for details.
+ timestamp (datetime): Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision.
+ url (str): Full URL/URI of resource captured.
+ sha1 (str): SHA-1 hash of data, in hex encoding
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ mimetype (str): Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. . [optional] # noqa: E501
+ status_code (int): HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. . [optional] # noqa: E501
+ size (int): Resource (file) size in bytes. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.surt = surt
+ self.timestamp = timestamp
+ self.url = url
+ self.sha1 = sha1
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, surt, timestamp, url, sha1, *args, **kwargs): # noqa: E501
+ """WebcaptureCdxLine - a model defined in OpenAPI
+
+ Args:
+ surt (str): \"Sortable URL\" format. See guide for details.
+ timestamp (datetime): Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision.
+ url (str): Full URL/URI of resource captured.
+ sha1 (str): SHA-1 hash of data, in hex encoding
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ mimetype (str): Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. . [optional] # noqa: E501
+ status_code (int): HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. . [optional] # noqa: E501
+ size (int): Resource (file) size in bytes. [optional] # noqa: E501
+ sha256 (str): SHA-256 hash of data, in hex encoding. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.surt = surt
+ self.timestamp = timestamp
+ self.url = url
+ self.sha1 = sha1
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/webcapture_entity.py b/python_openapi_client/fatcat_openapi_client/model/webcapture_entity.py
new file mode 100644
index 00000000..d62737aa
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/webcapture_entity.py
@@ -0,0 +1,340 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.release_entity import ReleaseEntity
+ from fatcat_openapi_client.model.webcapture_cdx_line import WebcaptureCdxLine
+ from fatcat_openapi_client.model.webcapture_url import WebcaptureUrl
+ globals()['ReleaseEntity'] = ReleaseEntity
+ globals()['WebcaptureCdxLine'] = WebcaptureCdxLine
+ globals()['WebcaptureUrl'] = WebcaptureUrl
+
+
+class WebcaptureEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'cdx': ([WebcaptureCdxLine],), # noqa: E501
+ 'archive_urls': ([WebcaptureUrl],), # noqa: E501
+ 'original_url': (str,), # noqa: E501
+ 'timestamp': (datetime,), # noqa: E501
+ 'content_scope': (str,), # noqa: E501
+ 'release_ids': ([str],), # noqa: E501
+ 'releases': ([ReleaseEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ 'cdx': 'cdx', # noqa: E501
+ 'archive_urls': 'archive_urls', # noqa: E501
+ 'original_url': 'original_url', # noqa: E501
+ 'timestamp': 'timestamp', # noqa: E501
+ 'content_scope': 'content_scope', # noqa: E501
+ 'release_ids': 'release_ids', # noqa: E501
+ 'releases': 'releases', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """WebcaptureEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ cdx ([WebcaptureCdxLine]): [optional] # noqa: E501
+ archive_urls ([WebcaptureUrl]): [optional] # noqa: E501
+ original_url (str): Base URL of the primary resource this is a capture of. [optional] # noqa: E501
+ timestamp (datetime): Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. . [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """WebcaptureEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ cdx ([WebcaptureCdxLine]): [optional] # noqa: E501
+ archive_urls ([WebcaptureUrl]): [optional] # noqa: E501
+ original_url (str): Base URL of the primary resource this is a capture of. [optional] # noqa: E501
+ timestamp (datetime): Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. . [optional] # noqa: E501
+ content_scope (str): [optional] # noqa: E501
+ release_ids ([str]): Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. . [optional] # noqa: E501
+ releases ([ReleaseEntity]): Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/webcapture_url.py b/python_openapi_client/fatcat_openapi_client/model/webcapture_url.py
new file mode 100644
index 00000000..81d1a191
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/webcapture_url.py
@@ -0,0 +1,276 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class WebcaptureUrl(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'url': (str,), # noqa: E501
+ 'rel': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'url': 'url', # noqa: E501
+ 'rel': 'rel', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, url, rel, *args, **kwargs): # noqa: E501
+ """WebcaptureUrl - a model defined in OpenAPI
+
+ Args:
+ url (str): URL/URI pointing to archive of this web resource.
+ rel (str): Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, url, rel, *args, **kwargs): # noqa: E501
+ """WebcaptureUrl - a model defined in OpenAPI
+
+ Args:
+ url (str): URL/URI pointing to archive of this web resource.
+ rel (str): Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list.
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.url = url
+ self.rel = rel
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/work_auto_batch.py b/python_openapi_client/fatcat_openapi_client/model/work_auto_batch.py
new file mode 100644
index 00000000..235fe3c5
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/work_auto_batch.py
@@ -0,0 +1,284 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+def lazy_import():
+ from fatcat_openapi_client.model.editgroup import Editgroup
+ from fatcat_openapi_client.model.work_entity import WorkEntity
+ globals()['Editgroup'] = Editgroup
+ globals()['WorkEntity'] = WorkEntity
+
+
+class WorkAutoBatch(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'editgroup': (Editgroup,), # noqa: E501
+ 'entity_list': ([WorkEntity],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'editgroup': 'editgroup', # noqa: E501
+ 'entity_list': 'entity_list', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """WorkAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([WorkEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, editgroup, entity_list, *args, **kwargs): # noqa: E501
+ """WorkAutoBatch - a model defined in OpenAPI
+
+ Args:
+ editgroup (Editgroup):
+ entity_list ([WorkEntity]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.editgroup = editgroup
+ self.entity_list = entity_list
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model/work_entity.py b/python_openapi_client/fatcat_openapi_client/model/work_entity.py
new file mode 100644
index 00000000..97346db2
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model/work_entity.py
@@ -0,0 +1,302 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from fatcat_openapi_client.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+ OpenApiModel
+)
+from fatcat_openapi_client.exceptions import ApiAttributeError
+
+
+
+class WorkEntity(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('state',): {
+ 'WIP': "wip",
+ 'ACTIVE': "active",
+ 'REDIRECT': "redirect",
+ 'DELETED': "deleted",
+ },
+ }
+
+ validations = {
+ ('ident',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ ('revision',): {
+ 'max_length': 36,
+ 'min_length': 36,
+ },
+ ('redirect',): {
+ 'max_length': 26,
+ 'min_length': 26,
+ },
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'state': (str,), # noqa: E501
+ 'ident': (str,), # noqa: E501
+ 'revision': (str,), # noqa: E501
+ 'redirect': (str,), # noqa: E501
+ 'extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ 'edit_extra': ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'state': 'state', # noqa: E501
+ 'ident': 'ident', # noqa: E501
+ 'revision': 'revision', # noqa: E501
+ 'redirect': 'redirect', # noqa: E501
+ 'extra': 'extra', # noqa: E501
+ 'edit_extra': 'edit_extra', # noqa: E501
+ }
+
+ read_only_vars = {
+ }
+
+ _composed_schemas = {}
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
+ """WorkEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ self = super(OpenApiModel, cls).__new__(cls)
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ return self
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """WorkEntity - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ state (str): [optional] # noqa: E501
+ ident (str): base32-encoded unique identifier. [optional] # noqa: E501
+ revision (str): UUID (lower-case, dash-separated, hex-encoded 128-bit). [optional] # noqa: E501
+ redirect (str): base32-encoded unique identifier. [optional] # noqa: E501
+ extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. . [optional] # noqa: E501
+ edit_extra ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)}): Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). . [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ for arg in args:
+ if isinstance(arg, dict):
+ kwargs.update(arg)
+ else:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+ if var_name in self.read_only_vars:
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes.")
diff --git a/python_openapi_client/fatcat_openapi_client/model_utils.py b/python_openapi_client/fatcat_openapi_client/model_utils.py
new file mode 100644
index 00000000..b785ef7e
--- /dev/null
+++ b/python_openapi_client/fatcat_openapi_client/model_utils.py
@@ -0,0 +1,2059 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from datetime import date, datetime # noqa: F401
+from copy import deepcopy
+import inspect
+import io
+import os
+import pprint
+import re
+import tempfile
+import uuid
+
+from dateutil.parser import parse
+
+from fatcat_openapi_client.exceptions import (
+ ApiKeyError,
+ ApiAttributeError,
+ ApiTypeError,
+ ApiValueError,
+)
+
+none_type = type(None)
+file_type = io.IOBase
+
+
+def convert_js_args_to_python_args(fn):
+ from functools import wraps
+ @wraps(fn)
+ def wrapped_init(_self, *args, **kwargs):
+ """
+ An attribute named `self` received from the api will conflicts with the reserved `self`
+ parameter of a class method. During generation, `self` attributes are mapped
+ to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts.
+ """
+ spec_property_naming = kwargs.get('_spec_property_naming', False)
+ if spec_property_naming:
+ kwargs = change_keys_js_to_python(
+ kwargs, _self if isinstance(
+ _self, type) else _self.__class__)
+ return fn(_self, *args, **kwargs)
+ return wrapped_init
+
+
+class cached_property(object):
+ # this caches the result of the function call for fn with no inputs
+ # use this as a decorator on function methods that you want converted
+ # into cached properties
+ result_key = '_results'
+
+ def __init__(self, fn):
+ self._fn = fn
+
+ def __get__(self, instance, cls=None):
+ if self.result_key in vars(self):
+ return vars(self)[self.result_key]
+ else:
+ result = self._fn()
+ setattr(self, self.result_key, result)
+ return result
+
+
+PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type)
+
+
+def allows_single_value_input(cls):
+ """
+ This function returns True if the input composed schema model or any
+ descendant model allows a value only input
+ This is true for cases where oneOf contains items like:
+ oneOf:
+ - float
+ - NumberWithValidation
+ - StringEnum
+ - ArrayModel
+ - null
+ TODO: lru_cache this
+ """
+ if (
+ issubclass(cls, ModelSimple) or
+ cls in PRIMITIVE_TYPES
+ ):
+ return True
+ elif issubclass(cls, ModelComposed):
+ if not cls._composed_schemas['oneOf']:
+ return False
+ return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf'])
+ return False
+
+
+def composed_model_input_classes(cls):
+ """
+ This function returns a list of the possible models that can be accepted as
+ inputs.
+ TODO: lru_cache this
+ """
+ if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES:
+ return [cls]
+ elif issubclass(cls, ModelNormal):
+ if cls.discriminator is None:
+ return [cls]
+ else:
+ return get_discriminated_classes(cls)
+ elif issubclass(cls, ModelComposed):
+ if not cls._composed_schemas['oneOf']:
+ return []
+ if cls.discriminator is None:
+ input_classes = []
+ for c in cls._composed_schemas['oneOf']:
+ input_classes.extend(composed_model_input_classes(c))
+ return input_classes
+ else:
+ return get_discriminated_classes(cls)
+ return []
+
+
+class OpenApiModel(object):
+ """The base class for all OpenAPIModels"""
+
+ def set_attribute(self, name, value):
+ # this is only used to set properties on self
+
+ path_to_item = []
+ if self._path_to_item:
+ path_to_item.extend(self._path_to_item)
+ path_to_item.append(name)
+
+ if name in self.openapi_types:
+ required_types_mixed = self.openapi_types[name]
+ elif self.additional_properties_type is None:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ path_to_item
+ )
+ elif self.additional_properties_type is not None:
+ required_types_mixed = self.additional_properties_type
+
+ if get_simple_class(name) != str:
+ error_msg = type_error_message(
+ var_name=name,
+ var_value=name,
+ valid_classes=(str,),
+ key_type=True
+ )
+ raise ApiTypeError(
+ error_msg,
+ path_to_item=path_to_item,
+ valid_classes=(str,),
+ key_type=True
+ )
+
+ if self._check_type:
+ value = validate_and_convert_types(
+ value, required_types_mixed, path_to_item, self._spec_property_naming,
+ self._check_type, configuration=self._configuration)
+ if (name,) in self.allowed_values:
+ check_allowed_values(
+ self.allowed_values,
+ (name,),
+ value
+ )
+ if (name,) in self.validations:
+ check_validations(
+ self.validations,
+ (name,),
+ value,
+ self._configuration
+ )
+ self.__dict__['_data_store'][name] = value
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
+
+ def __setattr__(self, attr, value):
+ """set the value of an attribute using dot notation: `instance.attr = val`"""
+ self[attr] = value
+
+ def __getattr__(self, attr):
+ """get the value of an attribute using dot notation: `instance.attr`"""
+ return self.__getitem__(attr)
+
+ def __copy__(self):
+ cls = self.__class__
+ if self.get("_spec_property_naming", False):
+ return cls._new_from_openapi_data(**self.__dict__)
+ else:
+ return cls.__new__(cls, **self.__dict__)
+
+ def __deepcopy__(self, memo):
+ cls = self.__class__
+
+ if self.get("_spec_property_naming", False):
+ new_inst = cls._new_from_openapi_data()
+ else:
+ new_inst = cls.__new__(cls)
+
+ for k, v in self.__dict__.items():
+ setattr(new_inst, k, deepcopy(v, memo))
+ return new_inst
+
+
+ def __new__(cls, *args, **kwargs):
+ # this function uses the discriminator to
+ # pick a new schema/class to instantiate because a discriminator
+ # propertyName value was passed in
+
+ if len(args) == 1:
+ arg = args[0]
+ if arg is None and is_type_nullable(cls):
+ # The input data is the 'null' value and the type is nullable.
+ return None
+
+ if issubclass(cls, ModelComposed) and allows_single_value_input(cls):
+ model_kwargs = {}
+ oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg)
+ return oneof_instance
+
+ visited_composed_classes = kwargs.get('_visited_composed_classes', ())
+ if (
+ cls.discriminator is None or
+ cls in visited_composed_classes
+ ):
+ # Use case 1: this openapi schema (cls) does not have a discriminator
+ # Use case 2: we have already visited this class before and are sure that we
+ # want to instantiate it this time. We have visited this class deserializing
+ # a payload with a discriminator. During that process we traveled through
+ # this class but did not make an instance of it. Now we are making an
+ # instance of a composed class which contains cls in it, so this time make an instance of cls.
+ #
+ # Here's an example of use case 2: If Animal has a discriminator
+ # petType and we pass in "Dog", and the class Dog
+ # allOf includes Animal, we move through Animal
+ # once using the discriminator, and pick Dog.
+ # Then in the composed schema dog Dog, we will make an instance of the
+ # Animal class (because Dal has allOf: Animal) but this time we won't travel
+ # through Animal's discriminator because we passed in
+ # _visited_composed_classes = (Animal,)
+
+ return super(OpenApiModel, cls).__new__(cls)
+
+ # Get the name and value of the discriminator property.
+ # The discriminator name is obtained from the discriminator meta-data
+ # and the discriminator value is obtained from the input data.
+ discr_propertyname_py = list(cls.discriminator.keys())[0]
+ discr_propertyname_js = cls.attribute_map[discr_propertyname_py]
+ if discr_propertyname_js in kwargs:
+ discr_value = kwargs[discr_propertyname_js]
+ elif discr_propertyname_py in kwargs:
+ discr_value = kwargs[discr_propertyname_py]
+ else:
+ # The input data does not contain the discriminator property.
+ path_to_item = kwargs.get('_path_to_item', ())
+ raise ApiValueError(
+ "Cannot deserialize input data due to missing discriminator. "
+ "The discriminator property '%s' is missing at path: %s" %
+ (discr_propertyname_js, path_to_item)
+ )
+
+ # Implementation note: the last argument to get_discriminator_class
+ # is a list of visited classes. get_discriminator_class may recursively
+ # call itself and update the list of visited classes, and the initial
+ # value must be an empty list. Hence not using 'visited_composed_classes'
+ new_cls = get_discriminator_class(
+ cls, discr_propertyname_py, discr_value, [])
+ if new_cls is None:
+ path_to_item = kwargs.get('_path_to_item', ())
+ disc_prop_value = kwargs.get(
+ discr_propertyname_js, kwargs.get(discr_propertyname_py))
+ raise ApiValueError(
+ "Cannot deserialize input data due to invalid discriminator "
+ "value. The OpenAPI document has no mapping for discriminator "
+ "property '%s'='%s' at path: %s" %
+ (discr_propertyname_js, disc_prop_value, path_to_item)
+ )
+
+ if new_cls in visited_composed_classes:
+ # if we are making an instance of a composed schema Descendent
+ # which allOf includes Ancestor, then Ancestor contains
+ # a discriminator that includes Descendent.
+ # So if we make an instance of Descendent, we have to make an
+ # instance of Ancestor to hold the allOf properties.
+ # This code detects that use case and makes the instance of Ancestor
+ # For example:
+ # When making an instance of Dog, _visited_composed_classes = (Dog,)
+ # then we make an instance of Animal to include in dog._composed_instances
+ # so when we are here, cls is Animal
+ # cls.discriminator != None
+ # cls not in _visited_composed_classes
+ # new_cls = Dog
+ # but we know we know that we already have Dog
+ # because it is in visited_composed_classes
+ # so make Animal here
+ return super(OpenApiModel, cls).__new__(cls)
+
+ # Build a list containing all oneOf and anyOf descendants.
+ oneof_anyof_classes = None
+ if cls._composed_schemas is not None:
+ oneof_anyof_classes = (
+ cls._composed_schemas.get('oneOf', ()) +
+ cls._composed_schemas.get('anyOf', ()))
+ oneof_anyof_child = new_cls in oneof_anyof_classes
+ kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,)
+
+ if cls._composed_schemas.get('allOf') and oneof_anyof_child:
+ # Validate that we can make self because when we make the
+ # new_cls it will not include the allOf validations in self
+ self_inst = super(OpenApiModel, cls).__new__(cls)
+ self_inst.__init__(*args, **kwargs)
+
+ if kwargs.get("_spec_property_naming", False):
+ # when true, implies new is from deserialization
+ new_inst = new_cls._new_from_openapi_data(*args, **kwargs)
+ else:
+ new_inst = new_cls.__new__(new_cls, *args, **kwargs)
+ new_inst.__init__(*args, **kwargs)
+
+ return new_inst
+
+ @classmethod
+ @convert_js_args_to_python_args
+ def _new_from_openapi_data(cls, *args, **kwargs):
+ # this function uses the discriminator to
+ # pick a new schema/class to instantiate because a discriminator
+ # propertyName value was passed in
+
+ if len(args) == 1:
+ arg = args[0]
+ if arg is None and is_type_nullable(cls):
+ # The input data is the 'null' value and the type is nullable.
+ return None
+
+ if issubclass(cls, ModelComposed) and allows_single_value_input(cls):
+ model_kwargs = {}
+ oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg)
+ return oneof_instance
+
+ visited_composed_classes = kwargs.get('_visited_composed_classes', ())
+ if (
+ cls.discriminator is None or
+ cls in visited_composed_classes
+ ):
+ # Use case 1: this openapi schema (cls) does not have a discriminator
+ # Use case 2: we have already visited this class before and are sure that we
+ # want to instantiate it this time. We have visited this class deserializing
+ # a payload with a discriminator. During that process we traveled through
+ # this class but did not make an instance of it. Now we are making an
+ # instance of a composed class which contains cls in it, so this time make an instance of cls.
+ #
+ # Here's an example of use case 2: If Animal has a discriminator
+ # petType and we pass in "Dog", and the class Dog
+ # allOf includes Animal, we move through Animal
+ # once using the discriminator, and pick Dog.
+ # Then in the composed schema dog Dog, we will make an instance of the
+ # Animal class (because Dal has allOf: Animal) but this time we won't travel
+ # through Animal's discriminator because we passed in
+ # _visited_composed_classes = (Animal,)
+
+ return cls._from_openapi_data(*args, **kwargs)
+
+ # Get the name and value of the discriminator property.
+ # The discriminator name is obtained from the discriminator meta-data
+ # and the discriminator value is obtained from the input data.
+ discr_propertyname_py = list(cls.discriminator.keys())[0]
+ discr_propertyname_js = cls.attribute_map[discr_propertyname_py]
+ if discr_propertyname_js in kwargs:
+ discr_value = kwargs[discr_propertyname_js]
+ elif discr_propertyname_py in kwargs:
+ discr_value = kwargs[discr_propertyname_py]
+ else:
+ # The input data does not contain the discriminator property.
+ path_to_item = kwargs.get('_path_to_item', ())
+ raise ApiValueError(
+ "Cannot deserialize input data due to missing discriminator. "
+ "The discriminator property '%s' is missing at path: %s" %
+ (discr_propertyname_js, path_to_item)
+ )
+
+ # Implementation note: the last argument to get_discriminator_class
+ # is a list of visited classes. get_discriminator_class may recursively
+ # call itself and update the list of visited classes, and the initial
+ # value must be an empty list. Hence not using 'visited_composed_classes'
+ new_cls = get_discriminator_class(
+ cls, discr_propertyname_py, discr_value, [])
+ if new_cls is None:
+ path_to_item = kwargs.get('_path_to_item', ())
+ disc_prop_value = kwargs.get(
+ discr_propertyname_js, kwargs.get(discr_propertyname_py))
+ raise ApiValueError(
+ "Cannot deserialize input data due to invalid discriminator "
+ "value. The OpenAPI document has no mapping for discriminator "
+ "property '%s'='%s' at path: %s" %
+ (discr_propertyname_js, disc_prop_value, path_to_item)
+ )
+
+ if new_cls in visited_composed_classes:
+ # if we are making an instance of a composed schema Descendent
+ # which allOf includes Ancestor, then Ancestor contains
+ # a discriminator that includes Descendent.
+ # So if we make an instance of Descendent, we have to make an
+ # instance of Ancestor to hold the allOf properties.
+ # This code detects that use case and makes the instance of Ancestor
+ # For example:
+ # When making an instance of Dog, _visited_composed_classes = (Dog,)
+ # then we make an instance of Animal to include in dog._composed_instances
+ # so when we are here, cls is Animal
+ # cls.discriminator != None
+ # cls not in _visited_composed_classes
+ # new_cls = Dog
+ # but we know we know that we already have Dog
+ # because it is in visited_composed_classes
+ # so make Animal here
+ return cls._from_openapi_data(*args, **kwargs)
+
+ # Build a list containing all oneOf and anyOf descendants.
+ oneof_anyof_classes = None
+ if cls._composed_schemas is not None:
+ oneof_anyof_classes = (
+ cls._composed_schemas.get('oneOf', ()) +
+ cls._composed_schemas.get('anyOf', ()))
+ oneof_anyof_child = new_cls in oneof_anyof_classes
+ kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,)
+
+ if cls._composed_schemas.get('allOf') and oneof_anyof_child:
+ # Validate that we can make self because when we make the
+ # new_cls it will not include the allOf validations in self
+ self_inst = cls._from_openapi_data(*args, **kwargs)
+
+ new_inst = new_cls._new_from_openapi_data(*args, **kwargs)
+ return new_inst
+
+
+class ModelSimple(OpenApiModel):
+ """the parent class of models whose type != object in their
+ swagger/openapi"""
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ self.set_attribute(name, value)
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ return self.__dict__['_data_store'].get(name, default)
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ if name in self:
+ return self.get(name)
+
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`"""
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ return name in self.__dict__['_data_store']
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return str(self.value)
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ this_val = self._data_store['value']
+ that_val = other._data_store['value']
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ return vals_equal
+
+
+class ModelNormal(OpenApiModel):
+ """the parent class of models whose type == object in their
+ swagger/openapi"""
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ self.set_attribute(name, value)
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ return self.__dict__['_data_store'].get(name, default)
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ if name in self:
+ return self.get(name)
+
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`"""
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ return name in self.__dict__['_data_store']
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ return model_to_dict(self, serialize=False)
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ if not set(self._data_store.keys()) == set(other._data_store.keys()):
+ return False
+ for _var_name, this_val in self._data_store.items():
+ that_val = other._data_store[_var_name]
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ if not vals_equal:
+ return False
+ return True
+
+
+class ModelComposed(OpenApiModel):
+ """the parent class of models whose type == object in their
+ swagger/openapi and have oneOf/allOf/anyOf
+
+ When one sets a property we use var_name_to_model_instances to store the value in
+ the correct class instances + run any type checking + validation code.
+ When one gets a property we use var_name_to_model_instances to get the value
+ from the correct class instances.
+ This allows multiple composed schemas to contain the same property with additive
+ constraints on the value.
+
+ _composed_schemas (dict) stores the anyOf/allOf/oneOf classes
+ key (str): allOf/oneOf/anyOf
+ value (list): the classes in the XOf definition.
+ Note: none_type can be included when the openapi document version >= 3.1.0
+ _composed_instances (list): stores a list of instances of the composed schemas
+ defined in _composed_schemas. When properties are accessed in the self instance,
+ they are returned from the self._data_store or the data stores in the instances
+ in self._composed_schemas
+ _var_name_to_model_instances (dict): maps between a variable name on self and
+ the composed instances (self included) which contain that data
+ key (str): property name
+ value (list): list of class instances, self or instances in _composed_instances
+ which contain the value that the key is referring to.
+ """
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
+
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
+
+ __unset_attribute_value__ = object()
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ # get the attribute from the correct instance
+ model_instances = self._var_name_to_model_instances.get(name)
+ values = []
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
+ if model_instances:
+ for model_instance in model_instances:
+ if name in model_instance._data_store:
+ v = model_instance._data_store[name]
+ if v not in values:
+ values.append(v)
+ len_values = len(values)
+ if len_values == 0:
+ return default
+ elif len_values == 1:
+ return values[0]
+ elif len_values > 1:
+ raise ApiValueError(
+ "Values stored for property {0} in {1} differ when looking "
+ "at self and self's composed instances. All values must be "
+ "the same".format(name, type(self).__name__),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ value = self.get(name, self.__unset_attribute_value__)
+ if value is self.__unset_attribute_value__:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ return value
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`"""
+
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ model_instances = self._var_name_to_model_instances.get(
+ name, self._additional_properties_model_instances)
+
+ if model_instances:
+ for model_instance in model_instances:
+ if name in model_instance._data_store:
+ return True
+
+ return False
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ return model_to_dict(self, serialize=False)
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ if not set(self._data_store.keys()) == set(other._data_store.keys()):
+ return False
+ for _var_name, this_val in self._data_store.items():
+ that_val = other._data_store[_var_name]
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ if not vals_equal:
+ return False
+ return True
+
+
+COERCION_INDEX_BY_TYPE = {
+ ModelComposed: 0,
+ ModelNormal: 1,
+ ModelSimple: 2,
+ none_type: 3, # The type of 'None'.
+ list: 4,
+ dict: 5,
+ float: 6,
+ int: 7,
+ bool: 8,
+ datetime: 9,
+ date: 10,
+ str: 11,
+ file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type.
+}
+
+# these are used to limit what type conversions we try to do
+# when we have a valid type already and we want to try converting
+# to another type
+UPCONVERSION_TYPE_PAIRS = (
+ (str, datetime),
+ (str, date),
+ # A float may be serialized as an integer, e.g. '3' is a valid serialized float.
+ (int, float),
+ (list, ModelComposed),
+ (dict, ModelComposed),
+ (str, ModelComposed),
+ (int, ModelComposed),
+ (float, ModelComposed),
+ (list, ModelComposed),
+ (list, ModelNormal),
+ (dict, ModelNormal),
+ (str, ModelSimple),
+ (int, ModelSimple),
+ (float, ModelSimple),
+ (list, ModelSimple),
+)
+
+COERCIBLE_TYPE_PAIRS = {
+ False: ( # client instantiation of a model with client data
+ # (dict, ModelComposed),
+ # (list, ModelComposed),
+ # (dict, ModelNormal),
+ # (list, ModelNormal),
+ # (str, ModelSimple),
+ # (int, ModelSimple),
+ # (float, ModelSimple),
+ # (list, ModelSimple),
+ # (str, int),
+ # (str, float),
+ # (str, datetime),
+ # (str, date),
+ # (int, str),
+ # (float, str),
+ ),
+ True: ( # server -> client data
+ (dict, ModelComposed),
+ (list, ModelComposed),
+ (dict, ModelNormal),
+ (list, ModelNormal),
+ (str, ModelSimple),
+ (int, ModelSimple),
+ (float, ModelSimple),
+ (list, ModelSimple),
+ # (str, int),
+ # (str, float),
+ (str, datetime),
+ (str, date),
+ # (int, str),
+ # (float, str),
+ (str, file_type)
+ ),
+}
+
+
+def get_simple_class(input_value):
+ """Returns an input_value's simple class that we will use for type checking
+ Python2:
+ float and int will return int, where int is the python3 int backport
+ str and unicode will return str, where str is the python3 str backport
+ Note: float and int ARE both instances of int backport
+ Note: str_py2 and unicode_py2 are NOT both instances of str backport
+
+ Args:
+ input_value (class/class_instance): the item for which we will return
+ the simple class
+ """
+ if isinstance(input_value, type):
+ # input_value is a class
+ return input_value
+ elif isinstance(input_value, tuple):
+ return tuple
+ elif isinstance(input_value, list):
+ return list
+ elif isinstance(input_value, dict):
+ return dict
+ elif isinstance(input_value, none_type):
+ return none_type
+ elif isinstance(input_value, file_type):
+ return file_type
+ elif isinstance(input_value, bool):
+ # this must be higher than the int check because
+ # isinstance(True, int) == True
+ return bool
+ elif isinstance(input_value, int):
+ return int
+ elif isinstance(input_value, datetime):
+ # this must be higher than the date check because
+ # isinstance(datetime_instance, date) == True
+ return datetime
+ elif isinstance(input_value, date):
+ return date
+ elif isinstance(input_value, str):
+ return str
+ return type(input_value)
+
+
+def check_allowed_values(allowed_values, input_variable_path, input_values):
+ """Raises an exception if the input_values are not allowed
+
+ Args:
+ allowed_values (dict): the allowed_values dict
+ input_variable_path (tuple): the path to the input variable
+ input_values (list/str/int/float/date/datetime): the values that we
+ are checking to see if they are in allowed_values
+ """
+ these_allowed_values = list(allowed_values[input_variable_path].values())
+ if (isinstance(input_values, list)
+ and not set(input_values).issubset(
+ set(these_allowed_values))):
+ invalid_values = ", ".join(
+ map(str, set(input_values) - set(these_allowed_values))),
+ raise ApiValueError(
+ "Invalid values for `%s` [%s], must be a subset of [%s]" %
+ (
+ input_variable_path[0],
+ invalid_values,
+ ", ".join(map(str, these_allowed_values))
+ )
+ )
+ elif (isinstance(input_values, dict)
+ and not set(
+ input_values.keys()).issubset(set(these_allowed_values))):
+ invalid_values = ", ".join(
+ map(str, set(input_values.keys()) - set(these_allowed_values)))
+ raise ApiValueError(
+ "Invalid keys in `%s` [%s], must be a subset of [%s]" %
+ (
+ input_variable_path[0],
+ invalid_values,
+ ", ".join(map(str, these_allowed_values))
+ )
+ )
+ elif (not isinstance(input_values, (list, dict))
+ and input_values not in these_allowed_values):
+ raise ApiValueError(
+ "Invalid value for `%s` (%s), must be one of %s" %
+ (
+ input_variable_path[0],
+ input_values,
+ these_allowed_values
+ )
+ )
+
+
+def is_json_validation_enabled(schema_keyword, configuration=None):
+ """Returns true if JSON schema validation is enabled for the specified
+ validation keyword. This can be used to skip JSON schema structural validation
+ as requested in the configuration.
+
+ Args:
+ schema_keyword (string): the name of a JSON schema validation keyword.
+ configuration (Configuration): the configuration class.
+ """
+
+ return (configuration is None or
+ not hasattr(configuration, '_disabled_client_side_validations') or
+ schema_keyword not in configuration._disabled_client_side_validations)
+
+
+def check_validations(
+ validations, input_variable_path, input_values,
+ configuration=None):
+ """Raises an exception if the input_values are invalid
+
+ Args:
+ validations (dict): the validation dictionary.
+ input_variable_path (tuple): the path to the input variable.
+ input_values (list/str/int/float/date/datetime): the values that we
+ are checking.
+ configuration (Configuration): the configuration class.
+ """
+
+ if input_values is None:
+ return
+
+ current_validations = validations[input_variable_path]
+ if (is_json_validation_enabled('multipleOf', configuration) and
+ 'multiple_of' in current_validations and
+ isinstance(input_values, (int, float)) and
+ not (float(input_values) / current_validations['multiple_of']).is_integer()):
+ # Note 'multipleOf' will be as good as the floating point arithmetic.
+ raise ApiValueError(
+ "Invalid value for `%s`, value must be a multiple of "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['multiple_of']
+ )
+ )
+
+ if (is_json_validation_enabled('maxLength', configuration) and
+ 'max_length' in current_validations and
+ len(input_values) > current_validations['max_length']):
+ raise ApiValueError(
+ "Invalid value for `%s`, length must be less than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['max_length']
+ )
+ )
+
+ if (is_json_validation_enabled('minLength', configuration) and
+ 'min_length' in current_validations and
+ len(input_values) < current_validations['min_length']):
+ raise ApiValueError(
+ "Invalid value for `%s`, length must be greater than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['min_length']
+ )
+ )
+
+ if (is_json_validation_enabled('maxItems', configuration) and
+ 'max_items' in current_validations and
+ len(input_values) > current_validations['max_items']):
+ raise ApiValueError(
+ "Invalid value for `%s`, number of items must be less than or "
+ "equal to `%s`" % (
+ input_variable_path[0],
+ current_validations['max_items']
+ )
+ )
+
+ if (is_json_validation_enabled('minItems', configuration) and
+ 'min_items' in current_validations and
+ len(input_values) < current_validations['min_items']):
+ raise ValueError(
+ "Invalid value for `%s`, number of items must be greater than or "
+ "equal to `%s`" % (
+ input_variable_path[0],
+ current_validations['min_items']
+ )
+ )
+
+ items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum',
+ 'inclusive_minimum')
+ if (any(item in current_validations for item in items)):
+ if isinstance(input_values, list):
+ max_val = max(input_values)
+ min_val = min(input_values)
+ elif isinstance(input_values, dict):
+ max_val = max(input_values.values())
+ min_val = min(input_values.values())
+ else:
+ max_val = input_values
+ min_val = input_values
+
+ if (is_json_validation_enabled('exclusiveMaximum', configuration) and
+ 'exclusive_maximum' in current_validations and
+ max_val >= current_validations['exclusive_maximum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value less than `%s`" % (
+ input_variable_path[0],
+ current_validations['exclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('maximum', configuration) and
+ 'inclusive_maximum' in current_validations and
+ max_val > current_validations['inclusive_maximum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value less than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['inclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('exclusiveMinimum', configuration) and
+ 'exclusive_minimum' in current_validations and
+ min_val <= current_validations['exclusive_minimum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value greater than `%s`" %
+ (
+ input_variable_path[0],
+ current_validations['exclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('minimum', configuration) and
+ 'inclusive_minimum' in current_validations and
+ min_val < current_validations['inclusive_minimum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value greater than or equal "
+ "to `%s`" % (
+ input_variable_path[0],
+ current_validations['inclusive_minimum']
+ )
+ )
+ flags = current_validations.get('regex', {}).get('flags', 0)
+ if (is_json_validation_enabled('pattern', configuration) and
+ 'regex' in current_validations and
+ not re.search(current_validations['regex']['pattern'],
+ input_values, flags=flags)):
+ err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % (
+ input_variable_path[0],
+ current_validations['regex']['pattern']
+ )
+ if flags != 0:
+ # Don't print the regex flags if the flags are not
+ # specified in the OAS document.
+ err_msg = r"%s with flags=`%s`" % (err_msg, flags)
+ raise ApiValueError(err_msg)
+
+
+def order_response_types(required_types):
+ """Returns the required types sorted in coercion order
+
+ Args:
+ required_types (list/tuple): collection of classes or instance of
+ list or dict with class information inside it.
+
+ Returns:
+ (list): coercion order sorted collection of classes or instance
+ of list or dict with class information inside it.
+ """
+
+ def index_getter(class_or_instance):
+ if isinstance(class_or_instance, list):
+ return COERCION_INDEX_BY_TYPE[list]
+ elif isinstance(class_or_instance, dict):
+ return COERCION_INDEX_BY_TYPE[dict]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelComposed)):
+ return COERCION_INDEX_BY_TYPE[ModelComposed]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelNormal)):
+ return COERCION_INDEX_BY_TYPE[ModelNormal]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelSimple)):
+ return COERCION_INDEX_BY_TYPE[ModelSimple]
+ elif class_or_instance in COERCION_INDEX_BY_TYPE:
+ return COERCION_INDEX_BY_TYPE[class_or_instance]
+ raise ApiValueError("Unsupported type: %s" % class_or_instance)
+
+ sorted_types = sorted(
+ required_types,
+ key=lambda class_or_instance: index_getter(class_or_instance)
+ )
+ return sorted_types
+
+
+def remove_uncoercible(required_types_classes, current_item, spec_property_naming,
+ must_convert=True):
+ """Only keeps the type conversions that are possible
+
+ Args:
+ required_types_classes (tuple): tuple of classes that are required
+ these should be ordered by COERCION_INDEX_BY_TYPE
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ current_item (any): the current item (input data) to be converted
+
+ Keyword Args:
+ must_convert (bool): if True the item to convert is of the wrong
+ type and we want a big list of coercibles
+ if False, we want a limited list of coercibles
+
+ Returns:
+ (list): the remaining coercible required types, classes only
+ """
+ current_type_simple = get_simple_class(current_item)
+
+ results_classes = []
+ for required_type_class in required_types_classes:
+ # convert our models to OpenApiModel
+ required_type_class_simplified = required_type_class
+ if isinstance(required_type_class_simplified, type):
+ if issubclass(required_type_class_simplified, ModelComposed):
+ required_type_class_simplified = ModelComposed
+ elif issubclass(required_type_class_simplified, ModelNormal):
+ required_type_class_simplified = ModelNormal
+ elif issubclass(required_type_class_simplified, ModelSimple):
+ required_type_class_simplified = ModelSimple
+
+ if required_type_class_simplified == current_type_simple:
+ # don't consider converting to one's own class
+ continue
+
+ class_pair = (current_type_simple, required_type_class_simplified)
+ if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]:
+ results_classes.append(required_type_class)
+ elif class_pair in UPCONVERSION_TYPE_PAIRS:
+ results_classes.append(required_type_class)
+ return results_classes
+
+
+def get_discriminated_classes(cls):
+ """
+ Returns all the classes that a discriminator converts to
+ TODO: lru_cache this
+ """
+ possible_classes = []
+ key = list(cls.discriminator.keys())[0]
+ if is_type_nullable(cls):
+ possible_classes.append(cls)
+ for discr_cls in cls.discriminator[key].values():
+ if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None:
+ possible_classes.extend(get_discriminated_classes(discr_cls))
+ else:
+ possible_classes.append(discr_cls)
+ return possible_classes
+
+
+def get_possible_classes(cls, from_server_context):
+ # TODO: lru_cache this
+ possible_classes = [cls]
+ if from_server_context:
+ return possible_classes
+ if hasattr(cls, 'discriminator') and cls.discriminator is not None:
+ possible_classes = []
+ possible_classes.extend(get_discriminated_classes(cls))
+ elif issubclass(cls, ModelComposed):
+ possible_classes.extend(composed_model_input_classes(cls))
+ return possible_classes
+
+
+def get_required_type_classes(required_types_mixed, spec_property_naming):
+ """Converts the tuple required_types into a tuple and a dict described
+ below
+
+ Args:
+ required_types_mixed (tuple/list): will contain either classes or
+ instance of list or dict
+ spec_property_naming (bool): if True these values came from the
+ server, and we use the data types in our endpoints.
+ If False, we are client side and we need to include
+ oneOf and discriminator classes inside the data types in our endpoints
+
+ Returns:
+ (valid_classes, dict_valid_class_to_child_types_mixed):
+ valid_classes (tuple): the valid classes that the current item
+ should be
+ dict_valid_class_to_child_types_mixed (dict):
+ valid_class (class): this is the key
+ child_types_mixed (list/dict/tuple): describes the valid child
+ types
+ """
+ valid_classes = []
+ child_req_types_by_current_type = {}
+ for required_type in required_types_mixed:
+ if isinstance(required_type, list):
+ valid_classes.append(list)
+ child_req_types_by_current_type[list] = required_type
+ elif isinstance(required_type, tuple):
+ valid_classes.append(tuple)
+ child_req_types_by_current_type[tuple] = required_type
+ elif isinstance(required_type, dict):
+ valid_classes.append(dict)
+ child_req_types_by_current_type[dict] = required_type[str]
+ else:
+ valid_classes.extend(get_possible_classes(required_type, spec_property_naming))
+ return tuple(valid_classes), child_req_types_by_current_type
+
+
+def change_keys_js_to_python(input_dict, model_class):
+ """
+ Converts from javascript_key keys in the input_dict to python_keys in
+ the output dict using the mapping in model_class.
+ If the input_dict contains a key which does not declared in the model_class,
+ the key is added to the output dict as is. The assumption is the model_class
+ may have undeclared properties (additionalProperties attribute in the OAS
+ document).
+ """
+
+ if getattr(model_class, 'attribute_map', None) is None:
+ return input_dict
+ output_dict = {}
+ reversed_attr_map = {value: key for key, value in
+ model_class.attribute_map.items()}
+ for javascript_key, value in input_dict.items():
+ python_key = reversed_attr_map.get(javascript_key)
+ if python_key is None:
+ # if the key is unknown, it is in error or it is an
+ # additionalProperties variable
+ python_key = javascript_key
+ output_dict[python_key] = value
+ return output_dict
+
+
+def get_type_error(var_value, path_to_item, valid_classes, key_type=False):
+ error_msg = type_error_message(
+ var_name=path_to_item[-1],
+ var_value=var_value,
+ valid_classes=valid_classes,
+ key_type=key_type
+ )
+ return ApiTypeError(
+ error_msg,
+ path_to_item=path_to_item,
+ valid_classes=valid_classes,
+ key_type=key_type
+ )
+
+
+def deserialize_primitive(data, klass, path_to_item):
+ """Deserializes string to primitive type.
+
+ :param data: str/int/float
+ :param klass: str/class the class to convert to
+
+ :return: int, float, str, bool, date, datetime
+ """
+ additional_message = ""
+ try:
+ if klass in {datetime, date}:
+ additional_message = (
+ "If you need your parameter to have a fallback "
+ "string value, please set its type as `type: {}` in your "
+ "spec. That allows the value to be any type. "
+ )
+ if klass == datetime:
+ if len(data) < 8:
+ raise ValueError("This is not a datetime")
+ # The string should be in iso8601 datetime format.
+ parsed_datetime = parse(data)
+ date_only = (
+ parsed_datetime.hour == 0 and
+ parsed_datetime.minute == 0 and
+ parsed_datetime.second == 0 and
+ parsed_datetime.tzinfo is None and
+ 8 <= len(data) <= 10
+ )
+ if date_only:
+ raise ValueError("This is a date, not a datetime")
+ return parsed_datetime
+ elif klass == date:
+ if len(data) < 8:
+ raise ValueError("This is not a date")
+ return parse(data).date()
+ else:
+ converted_value = klass(data)
+ if isinstance(data, str) and klass == float:
+ if str(converted_value) != data:
+ # '7' -> 7.0 -> '7.0' != '7'
+ raise ValueError('This is not a float')
+ return converted_value
+ except (OverflowError, ValueError) as ex:
+ # parse can raise OverflowError
+ raise ApiValueError(
+ "{0}Failed to parse {1} as {2}".format(
+ additional_message, repr(data), klass.__name__
+ ),
+ path_to_item=path_to_item
+ ) from ex
+
+
+def get_discriminator_class(model_class,
+ discr_name,
+ discr_value, cls_visited):
+ """Returns the child class specified by the discriminator.
+
+ Args:
+ model_class (OpenApiModel): the model class.
+ discr_name (string): the name of the discriminator property.
+ discr_value (any): the discriminator value.
+ cls_visited (list): list of model classes that have been visited.
+ Used to determine the discriminator class without
+ visiting circular references indefinitely.
+
+ Returns:
+ used_model_class (class/None): the chosen child class that will be used
+ to deserialize the data, for example dog.Dog.
+ If a class is not found, None is returned.
+ """
+
+ if model_class in cls_visited:
+ # The class has already been visited and no suitable class was found.
+ return None
+ cls_visited.append(model_class)
+ used_model_class = None
+ if discr_name in model_class.discriminator:
+ class_name_to_discr_class = model_class.discriminator[discr_name]
+ used_model_class = class_name_to_discr_class.get(discr_value)
+ if used_model_class is None:
+ # We didn't find a discriminated class in class_name_to_discr_class.
+ # So look in the ancestor or descendant discriminators
+ # The discriminator mapping may exist in a descendant (anyOf, oneOf)
+ # or ancestor (allOf).
+ # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat
+ # hierarchy, the discriminator mappings may be defined at any level
+ # in the hierarchy.
+ # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig
+ # if we try to make BasquePig from mammal, we need to travel through
+ # the oneOf descendant discriminators to find BasquePig
+ descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \
+ model_class._composed_schemas.get('anyOf', ())
+ ancestor_classes = model_class._composed_schemas.get('allOf', ())
+ possible_classes = descendant_classes + ancestor_classes
+ for cls in possible_classes:
+ # Check if the schema has inherited discriminators.
+ if hasattr(cls, 'discriminator') and cls.discriminator is not None:
+ used_model_class = get_discriminator_class(
+ cls, discr_name, discr_value, cls_visited)
+ if used_model_class is not None:
+ return used_model_class
+ return used_model_class
+
+
+def deserialize_model(model_data, model_class, path_to_item, check_type,
+ configuration, spec_property_naming):
+ """Deserializes model_data to model instance.
+
+ Args:
+ model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model
+ model_class (OpenApiModel): the model class
+ path_to_item (list): path to the model in the received data
+ check_type (bool): whether to check the data tupe for the values in
+ the model
+ configuration (Configuration): the instance to use to convert files
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+
+ Returns:
+ model instance
+
+ Raise:
+ ApiTypeError
+ ApiValueError
+ ApiKeyError
+ """
+
+ kw_args = dict(_check_type=check_type,
+ _path_to_item=path_to_item,
+ _configuration=configuration,
+ _spec_property_naming=spec_property_naming)
+
+ if issubclass(model_class, ModelSimple):
+ return model_class._new_from_openapi_data(model_data, **kw_args)
+ elif isinstance(model_data, list):
+ return model_class._new_from_openapi_data(*model_data, **kw_args)
+ if isinstance(model_data, dict):
+ kw_args.update(model_data)
+ return model_class._new_from_openapi_data(**kw_args)
+ elif isinstance(model_data, PRIMITIVE_TYPES):
+ return model_class._new_from_openapi_data(model_data, **kw_args)
+
+
+def deserialize_file(response_data, configuration, content_disposition=None):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ Args:
+ param response_data (str): the file data to write
+ configuration (Configuration): the instance to use to convert files
+
+ Keyword Args:
+ content_disposition (str): the value of the Content-Disposition
+ header
+
+ Returns:
+ (file_type): the deserialized file which is open
+ The user is responsible for closing and reading the file
+ """
+ fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ if content_disposition:
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition,
+ flags=re.I)
+ if filename is not None:
+ filename = filename.group(1)
+ else:
+ filename = "default_" + str(uuid.uuid4())
+
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ if isinstance(response_data, str):
+ # change str to bytes so we can write it
+ response_data = response_data.encode('utf-8')
+ f.write(response_data)
+
+ f = open(path, "rb")
+ return f
+
+
+def attempt_convert_item(input_value, valid_classes, path_to_item,
+ configuration, spec_property_naming, key_type=False,
+ must_convert=False, check_type=True):
+ """
+ Args:
+ input_value (any): the data to convert
+ valid_classes (any): the classes that are valid
+ path_to_item (list): the path to the item to convert
+ configuration (Configuration): the instance to use to convert files
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ key_type (bool): if True we need to convert a key type (not supported)
+ must_convert (bool): if True we must convert
+ check_type (bool): if True we check the type or the returned data in
+ ModelComposed/ModelNormal/ModelSimple instances
+
+ Returns:
+ instance (any) the fixed item
+
+ Raises:
+ ApiTypeError
+ ApiValueError
+ ApiKeyError
+ """
+ valid_classes_ordered = order_response_types(valid_classes)
+ valid_classes_coercible = remove_uncoercible(
+ valid_classes_ordered, input_value, spec_property_naming)
+ if not valid_classes_coercible or key_type:
+ # we do not handle keytype errors, json will take care
+ # of this for us
+ if configuration is None or not configuration.discard_unknown_keys:
+ raise get_type_error(input_value, path_to_item, valid_classes,
+ key_type=key_type)
+ for valid_class in valid_classes_coercible:
+ try:
+ if issubclass(valid_class, OpenApiModel):
+ return deserialize_model(input_value, valid_class,
+ path_to_item, check_type,
+ configuration, spec_property_naming)
+ elif valid_class == file_type:
+ return deserialize_file(input_value, configuration)
+ return deserialize_primitive(input_value, valid_class,
+ path_to_item)
+ except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc:
+ if must_convert:
+ raise conversion_exc
+ # if we have conversion errors when must_convert == False
+ # we ignore the exception and move on to the next class
+ continue
+ # we were unable to convert, must_convert == False
+ return input_value
+
+
+def is_type_nullable(input_type):
+ """
+ Returns true if None is an allowed value for the specified input_type.
+
+ A type is nullable if at least one of the following conditions is true:
+ 1. The OAS 'nullable' attribute has been specified,
+ 1. The type is the 'null' type,
+ 1. The type is a anyOf/oneOf composed schema, and a child schema is
+ the 'null' type.
+ Args:
+ input_type (type): the class of the input_value that we are
+ checking
+ Returns:
+ bool
+ """
+ if input_type is none_type:
+ return True
+ if issubclass(input_type, OpenApiModel) and input_type._nullable:
+ return True
+ if issubclass(input_type, ModelComposed):
+ # If oneOf/anyOf, check if the 'null' type is one of the allowed types.
+ for t in input_type._composed_schemas.get('oneOf', ()):
+ if is_type_nullable(t):
+ return True
+ for t in input_type._composed_schemas.get('anyOf', ()):
+ if is_type_nullable(t):
+ return True
+ return False
+
+
+def is_valid_type(input_class_simple, valid_classes):
+ """
+ Args:
+ input_class_simple (class): the class of the input_value that we are
+ checking
+ valid_classes (tuple): the valid classes that the current item
+ should be
+ Returns:
+ bool
+ """
+ if issubclass(input_class_simple, OpenApiModel) and \
+ valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,):
+ return True
+ valid_type = input_class_simple in valid_classes
+ if not valid_type and (
+ issubclass(input_class_simple, OpenApiModel) or
+ input_class_simple is none_type):
+ for valid_class in valid_classes:
+ if input_class_simple is none_type and is_type_nullable(valid_class):
+ # Schema is oneOf/anyOf and the 'null' type is one of the allowed types.
+ return True
+ if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator):
+ continue
+ discr_propertyname_py = list(valid_class.discriminator.keys())[0]
+ discriminator_classes = (
+ valid_class.discriminator[discr_propertyname_py].values()
+ )
+ valid_type = is_valid_type(input_class_simple, discriminator_classes)
+ if valid_type:
+ return True
+ return valid_type
+
+
+def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
+ spec_property_naming, _check_type, configuration=None):
+ """Raises a TypeError is there is a problem, otherwise returns value
+
+ Args:
+ input_value (any): the data to validate/convert
+ required_types_mixed (list/dict/tuple): A list of
+ valid classes, or a list tuples of valid classes, or a dict where
+ the value is a tuple of value classes
+ path_to_item: (list) the path to the data being validated
+ this stores a list of keys or indices to get to the data being
+ validated
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ _check_type: (boolean) if true, type will be checked and conversion
+ will be attempted.
+ configuration: (Configuration): the configuration class to use
+ when converting file_type items.
+ If passed, conversion will be attempted when possible
+ If not passed, no conversions will be attempted and
+ exceptions will be raised
+
+ Returns:
+ the correctly typed value
+
+ Raises:
+ ApiTypeError
+ """
+ results = get_required_type_classes(required_types_mixed, spec_property_naming)
+ valid_classes, child_req_types_by_current_type = results
+
+ input_class_simple = get_simple_class(input_value)
+ valid_type = is_valid_type(input_class_simple, valid_classes)
+ if not valid_type:
+ if (configuration
+ or (input_class_simple == dict
+ and dict not in valid_classes)):
+ # if input_value is not valid_type try to convert it
+ converted_instance = attempt_convert_item(
+ input_value,
+ valid_classes,
+ path_to_item,
+ configuration,
+ spec_property_naming,
+ key_type=False,
+ must_convert=True,
+ check_type=_check_type
+ )
+ return converted_instance
+ else:
+ raise get_type_error(input_value, path_to_item, valid_classes,
+ key_type=False)
+
+ # input_value's type is in valid_classes
+ if len(valid_classes) > 1 and configuration:
+ # there are valid classes which are not the current class
+ valid_classes_coercible = remove_uncoercible(
+ valid_classes, input_value, spec_property_naming, must_convert=False)
+ if valid_classes_coercible:
+ converted_instance = attempt_convert_item(
+ input_value,
+ valid_classes_coercible,
+ path_to_item,
+ configuration,
+ spec_property_naming,
+ key_type=False,
+ must_convert=False,
+ check_type=_check_type
+ )
+ return converted_instance
+
+ if child_req_types_by_current_type == {}:
+ # all types are of the required types and there are no more inner
+ # variables left to look at
+ return input_value
+ inner_required_types = child_req_types_by_current_type.get(
+ type(input_value)
+ )
+ if inner_required_types is None:
+ # for this type, there are not more inner variables left to look at
+ return input_value
+ if isinstance(input_value, list):
+ if input_value == []:
+ # allow an empty list
+ return input_value
+ for index, inner_value in enumerate(input_value):
+ inner_path = list(path_to_item)
+ inner_path.append(index)
+ input_value[index] = validate_and_convert_types(
+ inner_value,
+ inner_required_types,
+ inner_path,
+ spec_property_naming,
+ _check_type,
+ configuration=configuration
+ )
+ elif isinstance(input_value, dict):
+ if input_value == {}:
+ # allow an empty dict
+ return input_value
+ for inner_key, inner_val in input_value.items():
+ inner_path = list(path_to_item)
+ inner_path.append(inner_key)
+ if get_simple_class(inner_key) != str:
+ raise get_type_error(inner_key, inner_path, valid_classes,
+ key_type=True)
+ input_value[inner_key] = validate_and_convert_types(
+ inner_val,
+ inner_required_types,
+ inner_path,
+ spec_property_naming,
+ _check_type,
+ configuration=configuration
+ )
+ return input_value
+
+
+def model_to_dict(model_instance, serialize=True):
+ """Returns the model properties as a dict
+
+ Args:
+ model_instance (one of your model instances): the model instance that
+ will be converted to a dict.
+
+ Keyword Args:
+ serialize (bool): if True, the keys in the dict will be values from
+ attribute_map
+ """
+ result = {}
+
+ def extract_item(item): return (
+ item[0], model_to_dict(
+ item[1], serialize=serialize)) if hasattr(
+ item[1], '_data_store') else item
+
+ model_instances = [model_instance]
+ if model_instance._composed_schemas:
+ model_instances.extend(model_instance._composed_instances)
+ seen_json_attribute_names = set()
+ used_fallback_python_attribute_names = set()
+ py_to_json_map = {}
+ for model_instance in model_instances:
+ for attr, value in model_instance._data_store.items():
+ if serialize:
+ # we use get here because additional property key names do not
+ # exist in attribute_map
+ try:
+ attr = model_instance.attribute_map[attr]
+ py_to_json_map.update(model_instance.attribute_map)
+ seen_json_attribute_names.add(attr)
+ except KeyError:
+ used_fallback_python_attribute_names.add(attr)
+ if isinstance(value, list):
+ if not value:
+ # empty list or None
+ result[attr] = value
+ else:
+ res = []
+ for v in value:
+ if isinstance(v, PRIMITIVE_TYPES) or v is None:
+ res.append(v)
+ elif isinstance(v, ModelSimple):
+ res.append(v.value)
+ elif isinstance(v, dict):
+ res.append(dict(map(
+ extract_item,
+ v.items()
+ )))
+ else:
+ res.append(model_to_dict(v, serialize=serialize))
+ result[attr] = res
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ extract_item,
+ value.items()
+ ))
+ elif isinstance(value, ModelSimple):
+ result[attr] = value.value
+ elif hasattr(value, '_data_store'):
+ result[attr] = model_to_dict(value, serialize=serialize)
+ else:
+ result[attr] = value
+ if serialize:
+ for python_key in used_fallback_python_attribute_names:
+ json_key = py_to_json_map.get(python_key)
+ if json_key is None:
+ continue
+ if python_key == json_key:
+ continue
+ json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names
+ if json_key_assigned_no_need_for_python_key:
+ del result[python_key]
+
+ return result
+
+
+def type_error_message(var_value=None, var_name=None, valid_classes=None,
+ key_type=None):
+ """
+ Keyword Args:
+ var_value (any): the variable which has the type_error
+ var_name (str): the name of the variable which has the typ error
+ valid_classes (tuple): the accepted classes for current_item's
+ value
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ """
+ key_or_value = 'value'
+ if key_type:
+ key_or_value = 'key'
+ valid_classes_phrase = get_valid_classes_phrase(valid_classes)
+ msg = (
+ "Invalid type for variable '{0}'. Required {1} type {2} and "
+ "passed type was {3}".format(
+ var_name,
+ key_or_value,
+ valid_classes_phrase,
+ type(var_value).__name__,
+ )
+ )
+ return msg
+
+
+def get_valid_classes_phrase(input_classes):
+ """Returns a string phrase describing what types are allowed
+ """
+ all_classes = list(input_classes)
+ all_classes = sorted(all_classes, key=lambda cls: cls.__name__)
+ all_class_names = [cls.__name__ for cls in all_classes]
+ if len(all_class_names) == 1:
+ return 'is {0}'.format(all_class_names[0])
+ return "is one of [{0}]".format(", ".join(all_class_names))
+
+
+def get_allof_instances(self, model_args, constant_args):
+ """
+ Args:
+ self: the class we are handling
+ model_args (dict): var_name to var_value
+ used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
+
+ Returns
+ composed_instances (list)
+ """
+ composed_instances = []
+ for allof_class in self._composed_schemas['allOf']:
+
+ try:
+ if constant_args.get('_spec_property_naming'):
+ allof_instance = allof_class._from_openapi_data(**model_args, **constant_args)
+ else:
+ allof_instance = allof_class(**model_args, **constant_args)
+ composed_instances.append(allof_instance)
+ except Exception as ex:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of '%s'. The "
+ "input data was invalid for the allOf schema '%s' in the composed "
+ "schema '%s'. Error=%s" % (
+ allof_class.__name__,
+ allof_class.__name__,
+ self.__class__.__name__,
+ str(ex)
+ )
+ ) from ex
+ return composed_instances
+
+
+def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
+ """
+ Find the oneOf schema that matches the input data (e.g. payload).
+ If exactly one schema matches the input data, an instance of that schema
+ is returned.
+ If zero or more than one schema match the input data, an exception is raised.
+ In OAS 3.x, the payload MUST, by validation, match exactly one of the
+ schemas described by oneOf.
+
+ Args:
+ cls: the class we are handling
+ model_kwargs (dict): var_name to var_value
+ The input data, e.g. the payload that must match a oneOf schema
+ in the OpenAPI document.
+ constant_kwargs (dict): var_name to var_value
+ args that every model requires, including configuration, server
+ and path to item.
+
+ Kwargs:
+ model_arg: (int, float, bool, str, date, datetime, ModelSimple, None):
+ the value to assign to a primitive class or ModelSimple class
+ Notes:
+ - this is only passed in when oneOf includes types which are not object
+ - None is used to suppress handling of model_arg, nullable models are handled in __new__
+
+ Returns
+ oneof_instance (instance)
+ """
+ if len(cls._composed_schemas['oneOf']) == 0:
+ return None
+
+ oneof_instances = []
+ # Iterate over each oneOf schema and determine if the input data
+ # matches the oneOf schemas.
+ for oneof_class in cls._composed_schemas['oneOf']:
+ # The composed oneOf schema allows the 'null' type and the input data
+ # is the null value. This is a OAS >= 3.1 feature.
+ if oneof_class is none_type:
+ # skip none_types because we are deserializing dict data.
+ # none_type deserialization is handled in the __new__ method
+ continue
+
+ single_value_input = allows_single_value_input(oneof_class)
+
+ try:
+ if not single_value_input:
+ if constant_kwargs.get('_spec_property_naming'):
+ oneof_instance = oneof_class._from_openapi_data(
+ **model_kwargs, **constant_kwargs)
+ else:
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
+ else:
+ if issubclass(oneof_class, ModelSimple):
+ if constant_kwargs.get('_spec_property_naming'):
+ oneof_instance = oneof_class._from_openapi_data(
+ model_arg, **constant_kwargs)
+ else:
+ oneof_instance = oneof_class(model_arg, **constant_kwargs)
+ elif oneof_class in PRIMITIVE_TYPES:
+ oneof_instance = validate_and_convert_types(
+ model_arg,
+ (oneof_class,),
+ constant_kwargs['_path_to_item'],
+ constant_kwargs['_spec_property_naming'],
+ constant_kwargs['_check_type'],
+ configuration=constant_kwargs['_configuration']
+ )
+ oneof_instances.append(oneof_instance)
+ except Exception:
+ pass
+ if len(oneof_instances) == 0:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. None "
+ "of the oneOf schemas matched the input data." %
+ cls.__name__
+ )
+ elif len(oneof_instances) > 1:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. Multiple "
+ "oneOf schemas matched the inputs, but a max of one is allowed." %
+ cls.__name__
+ )
+ return oneof_instances[0]
+
+
+def get_anyof_instances(self, model_args, constant_args):
+ """
+ Args:
+ self: the class we are handling
+ model_args (dict): var_name to var_value
+ The input data, e.g. the payload that must match at least one
+ anyOf child schema in the OpenAPI document.
+ constant_args (dict): var_name to var_value
+ args that every model requires, including configuration, server
+ and path to item.
+
+ Returns
+ anyof_instances (list)
+ """
+ anyof_instances = []
+ if len(self._composed_schemas['anyOf']) == 0:
+ return anyof_instances
+
+ for anyof_class in self._composed_schemas['anyOf']:
+ # The composed oneOf schema allows the 'null' type and the input data
+ # is the null value. This is a OAS >= 3.1 feature.
+ if anyof_class is none_type:
+ # skip none_types because we are deserializing dict data.
+ # none_type deserialization is handled in the __new__ method
+ continue
+
+ try:
+ if constant_args.get('_spec_property_naming'):
+ anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args)
+ else:
+ anyof_instance = anyof_class(**model_args, **constant_args)
+ anyof_instances.append(anyof_instance)
+ except Exception:
+ pass
+ if len(anyof_instances) == 0:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. None of the "
+ "anyOf schemas matched the inputs." %
+ self.__class__.__name__
+ )
+ return anyof_instances
+
+
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
+ # before __init__ was called
+ for instance in composed_instances:
+ if instance.__class__ in self._composed_schemas['allOf']:
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ else:
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
+
+
+def validate_get_composed_info(constant_args, model_args, self):
+ """
+ For composed schemas, generate schema instances for
+ all schemas in the oneOf/anyOf/allOf definition. If additional
+ properties are allowed, also assign those properties on
+ all matched schemas that contain additionalProperties.
+ Openapi schemas are python classes.
+
+ Exceptions are raised if:
+ - 0 or > 1 oneOf schema matches the model_args input data
+ - no anyOf schema matches the model_args input data
+ - any of the allOf schemas do not match the model_args input data
+
+ Args:
+ constant_args (dict): these are the args that every model requires
+ model_args (dict): these are the required and optional spec args that
+ were passed in to make this model
+ self (class): the class that we are instantiating
+ This class contains self._composed_schemas
+
+ Returns:
+ composed_info (list): length three
+ composed_instances (list): the composed instances which are not
+ self
+ var_name_to_model_instances (dict): a dict going from var_name
+ to the model_instance which holds that var_name
+ the model_instance may be self or an instance of one of the
+ classes in self.composed_instances()
+ additional_properties_model_instances (list): a list of the
+ model instances which have the property
+ additional_properties_type. This list can include self
+ """
+ # create composed_instances
+ composed_instances = []
+ allof_instances = get_allof_instances(self, model_args, constant_args)
+ composed_instances.extend(allof_instances)
+ oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args)
+ if oneof_instance is not None:
+ composed_instances.append(oneof_instance)
+ anyof_instances = get_anyof_instances(self, model_args, constant_args)
+ composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
+
+ # map variable names to composed_instances
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + list(
+ filter(
+ lambda x: prop_name in x.openapi_types, composed_instances))
+
+ return [
+ composed_instances,
+ var_name_to_model_instances,
+ additional_properties_model_instances,
+ discarded_args
+ ]
diff --git a/python_openapi_client/fatcat_openapi_client/models/__init__.py b/python_openapi_client/fatcat_openapi_client/models/__init__.py
index 10b80063..1b5deada 100644
--- a/python_openapi_client/fatcat_openapi_client/models/__init__.py
+++ b/python_openapi_client/fatcat_openapi_client/models/__init__.py
@@ -1,52 +1,46 @@
-# coding: utf-8
-
# flake8: noqa
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-from __future__ import absolute_import
+# import all models into this package
+# if you have many models here with many references from one model to another this may
+# raise a RecursionError
+# to avoid this, import only the models that you directly need like:
+# from from fatcat_openapi_client.model.pet import Pet
+# or import this package, but before doing it, use:
+# import sys
+# sys.setrecursionlimit(n)
-# import models into model package
-from fatcat_openapi_client.models.auth_oidc import AuthOidc
-from fatcat_openapi_client.models.auth_oidc_result import AuthOidcResult
-from fatcat_openapi_client.models.auth_token_result import AuthTokenResult
-from fatcat_openapi_client.models.changelog_entry import ChangelogEntry
-from fatcat_openapi_client.models.container_auto_batch import ContainerAutoBatch
-from fatcat_openapi_client.models.container_entity import ContainerEntity
-from fatcat_openapi_client.models.creator_auto_batch import CreatorAutoBatch
-from fatcat_openapi_client.models.creator_entity import CreatorEntity
-from fatcat_openapi_client.models.editgroup import Editgroup
-from fatcat_openapi_client.models.editgroup_annotation import EditgroupAnnotation
-from fatcat_openapi_client.models.editgroup_edits import EditgroupEdits
-from fatcat_openapi_client.models.editor import Editor
-from fatcat_openapi_client.models.entity_edit import EntityEdit
-from fatcat_openapi_client.models.entity_history_entry import EntityHistoryEntry
-from fatcat_openapi_client.models.error_response import ErrorResponse
-from fatcat_openapi_client.models.file_auto_batch import FileAutoBatch
-from fatcat_openapi_client.models.file_entity import FileEntity
-from fatcat_openapi_client.models.file_url import FileUrl
-from fatcat_openapi_client.models.fileset_auto_batch import FilesetAutoBatch
-from fatcat_openapi_client.models.fileset_entity import FilesetEntity
-from fatcat_openapi_client.models.fileset_file import FilesetFile
-from fatcat_openapi_client.models.fileset_url import FilesetUrl
-from fatcat_openapi_client.models.release_abstract import ReleaseAbstract
-from fatcat_openapi_client.models.release_auto_batch import ReleaseAutoBatch
-from fatcat_openapi_client.models.release_contrib import ReleaseContrib
-from fatcat_openapi_client.models.release_entity import ReleaseEntity
-from fatcat_openapi_client.models.release_ext_ids import ReleaseExtIds
-from fatcat_openapi_client.models.release_ref import ReleaseRef
-from fatcat_openapi_client.models.success import Success
-from fatcat_openapi_client.models.webcapture_auto_batch import WebcaptureAutoBatch
-from fatcat_openapi_client.models.webcapture_cdx_line import WebcaptureCdxLine
-from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity
-from fatcat_openapi_client.models.webcapture_url import WebcaptureUrl
-from fatcat_openapi_client.models.work_auto_batch import WorkAutoBatch
-from fatcat_openapi_client.models.work_entity import WorkEntity
+from fatcat_openapi_client.model.auth_oidc import AuthOidc
+from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult
+from fatcat_openapi_client.model.auth_token_result import AuthTokenResult
+from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
+from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch
+from fatcat_openapi_client.model.container_entity import ContainerEntity
+from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+from fatcat_openapi_client.model.editgroup_edits import EditgroupEdits
+from fatcat_openapi_client.model.editor import Editor
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
+from fatcat_openapi_client.model.error_response import ErrorResponse
+from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch
+from fatcat_openapi_client.model.file_entity import FileEntity
+from fatcat_openapi_client.model.file_url import FileUrl
+from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+from fatcat_openapi_client.model.fileset_file import FilesetFile
+from fatcat_openapi_client.model.fileset_url import FilesetUrl
+from fatcat_openapi_client.model.release_abstract import ReleaseAbstract
+from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch
+from fatcat_openapi_client.model.release_contrib import ReleaseContrib
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.release_ext_ids import ReleaseExtIds
+from fatcat_openapi_client.model.release_ref import ReleaseRef
+from fatcat_openapi_client.model.success import Success
+from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch
+from fatcat_openapi_client.model.webcapture_cdx_line import WebcaptureCdxLine
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+from fatcat_openapi_client.model.webcapture_url import WebcaptureUrl
+from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch
+from fatcat_openapi_client.model.work_entity import WorkEntity
diff --git a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py b/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py
deleted file mode 100644
index 7b1da81b..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py
+++ /dev/null
@@ -1,203 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class AuthOidc(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_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 OpenAPI""" # 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
-
- Fatcat-specific short name (slug) for remote service being used for authentication. # 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.
-
- Fatcat-specific short name (slug) for remote service being used for authentication. # noqa: E501
-
- :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
-
- `SUB` from OIDC protocol. Usually a URL. # 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.
-
- `SUB` from OIDC protocol. Usually a URL. # noqa: E501
-
- :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
-
- `ISS` from OIDC protocol. Usually a stable account username, number, or identifier. # 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.
-
- `ISS` from OIDC protocol. Usually a stable account username, number, or identifier. # noqa: E501
-
- :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
-
- What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur. # 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.
-
- What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur. # noqa: E501
-
- :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.openapi_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_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py b/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py
deleted file mode 100644
index 5aa9dbfd..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class AuthOidcResult(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_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 OpenAPI""" # 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.openapi_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_openapi_client/fatcat_openapi_client/models/auth_token_result.py b/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py
deleted file mode 100644
index 19c45e2e..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class AuthTokenResult(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'token': 'str'
- }
-
- attribute_map = {
- 'token': 'token'
- }
-
- def __init__(self, token=None): # noqa: E501
- """AuthTokenResult - a model defined in OpenAPI""" # noqa: E501
-
- self._token = None
- self.discriminator = None
-
- self.token = token
-
- @property
- def token(self):
- """Gets the token of this AuthTokenResult. # noqa: E501
-
-
- :return: The token of this AuthTokenResult. # noqa: E501
- :rtype: str
- """
- return self._token
-
- @token.setter
- def token(self, token):
- """Sets the token of this AuthTokenResult.
-
-
- :param token: The token of this AuthTokenResult. # 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.openapi_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, AuthTokenResult):
- 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_openapi_client/fatcat_openapi_client/models/changelog_entry.py b/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py
deleted file mode 100644
index bf9355d9..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ChangelogEntry(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'index': 'int',
- 'editgroup_id': 'str',
- 'timestamp': 'datetime',
- 'editgroup': 'Editgroup'
- }
-
- attribute_map = {
- 'index': 'index',
- 'editgroup_id': 'editgroup_id',
- 'timestamp': 'timestamp',
- 'editgroup': 'editgroup'
- }
-
- def __init__(self, index=None, editgroup_id=None, timestamp=None, editgroup=None): # noqa: E501
- """ChangelogEntry - a model defined in OpenAPI""" # noqa: E501
-
- self._index = None
- self._editgroup_id = None
- self._timestamp = None
- self._editgroup = None
- self.discriminator = None
-
- self.index = index
- self.editgroup_id = editgroup_id
- self.timestamp = timestamp
- if editgroup is not None:
- self.editgroup = editgroup
-
- @property
- def index(self):
- """Gets the index of this ChangelogEntry. # noqa: E501
-
- Monotonically increasing sequence number of this changelog entry. # noqa: E501
-
- :return: The index of this ChangelogEntry. # noqa: E501
- :rtype: int
- """
- return self._index
-
- @index.setter
- def index(self, index):
- """Sets the index of this ChangelogEntry.
-
- Monotonically increasing sequence number of this changelog entry. # noqa: E501
-
- :param index: The index of this ChangelogEntry. # noqa: E501
- :type: int
- """
- if index is None:
- raise ValueError("Invalid value for `index`, must not be `None`") # noqa: E501
-
- self._index = index
-
- @property
- def editgroup_id(self):
- """Gets the editgroup_id of this ChangelogEntry. # noqa: E501
-
- Identifier of editgroup accepted/merged in this changelog entry. # noqa: E501
-
- :return: The editgroup_id of this ChangelogEntry. # noqa: E501
- :rtype: str
- """
- return self._editgroup_id
-
- @editgroup_id.setter
- def editgroup_id(self, editgroup_id):
- """Sets the editgroup_id of this ChangelogEntry.
-
- Identifier of editgroup accepted/merged in this changelog entry. # noqa: E501
-
- :param editgroup_id: The editgroup_id of this ChangelogEntry. # noqa: E501
- :type: str
- """
- if editgroup_id is None:
- raise ValueError("Invalid value for `editgroup_id`, must not be `None`") # noqa: E501
-
- self._editgroup_id = editgroup_id
-
- @property
- def timestamp(self):
- """Gets the timestamp of this ChangelogEntry. # noqa: E501
-
- Date and time when the editgroup was accpeted. # noqa: E501
-
- :return: The timestamp of this ChangelogEntry. # noqa: E501
- :rtype: datetime
- """
- return self._timestamp
-
- @timestamp.setter
- def timestamp(self, timestamp):
- """Sets the timestamp of this ChangelogEntry.
-
- Date and time when the editgroup was accpeted. # noqa: E501
-
- :param timestamp: The timestamp of this ChangelogEntry. # noqa: E501
- :type: datetime
- """
- if timestamp is None:
- raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
-
- self._timestamp = timestamp
-
- @property
- def editgroup(self):
- """Gets the editgroup of this ChangelogEntry. # noqa: E501
-
-
- :return: The editgroup of this ChangelogEntry. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this ChangelogEntry.
-
-
- :param editgroup: The editgroup of this ChangelogEntry. # noqa: E501
- :type: Editgroup
- """
-
- self._editgroup = editgroup
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ChangelogEntry):
- 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_openapi_client/fatcat_openapi_client/models/container_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py
deleted file mode 100644
index df30ca1d..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ContainerAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[ContainerEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """ContainerAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this ContainerAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this ContainerAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this ContainerAutoBatch.
-
-
- :param editgroup: The editgroup of this ContainerAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this ContainerAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this ContainerAutoBatch. # noqa: E501
- :rtype: list[ContainerEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this ContainerAutoBatch.
-
-
- :param entity_list: The entity_list of this ContainerAutoBatch. # noqa: E501
- :type: list[ContainerEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ContainerAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/container_entity.py b/python_openapi_client/fatcat_openapi_client/models/container_entity.py
deleted file mode 100644
index d6b23469..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/container_entity.py
+++ /dev/null
@@ -1,517 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.4.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ContainerEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'name': 'str',
- 'container_type': 'str',
- 'publication_status': 'str',
- 'publisher': 'str',
- 'issnl': 'str',
- 'issne': 'str',
- 'issnp': 'str',
- 'wikidata_qid': 'str'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'name': 'name',
- 'container_type': 'container_type',
- 'publication_status': 'publication_status',
- 'publisher': 'publisher',
- 'issnl': 'issnl',
- 'issne': 'issne',
- 'issnp': 'issnp',
- 'wikidata_qid': 'wikidata_qid'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, name=None, container_type=None, publication_status=None, publisher=None, issnl=None, issne=None, issnp=None, wikidata_qid=None): # noqa: E501
- """ContainerEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._name = None
- self._container_type = None
- self._publication_status = None
- self._publisher = None
- self._issnl = None
- self._issne = None
- self._issnp = None
- self._wikidata_qid = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if name is not None:
- self.name = name
- if container_type is not None:
- self.container_type = container_type
- if publication_status is not None:
- self.publication_status = publication_status
- if publisher is not None:
- self.publisher = publisher
- if issnl is not None:
- self.issnl = issnl
- if issne is not None:
- self.issne = issne
- if issnp is not None:
- self.issnp = issnp
- if wikidata_qid is not None:
- self.wikidata_qid = wikidata_qid
-
- @property
- def state(self):
- """Gets the state of this ContainerEntity. # noqa: E501
-
-
- :return: The state of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this ContainerEntity.
-
-
- :param state: The state of this ContainerEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this ContainerEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this ContainerEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this ContainerEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this ContainerEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this ContainerEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this ContainerEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this ContainerEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this ContainerEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this ContainerEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this ContainerEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this ContainerEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this ContainerEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this ContainerEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this ContainerEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this ContainerEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this ContainerEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this ContainerEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def name(self):
- """Gets the name of this ContainerEntity. # noqa: E501
-
- Name of the container (eg, Journal title). Required for entity creation. # noqa: E501
-
- :return: The name of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._name
-
- @name.setter
- def name(self, name):
- """Sets the name of this ContainerEntity.
-
- Name of the container (eg, Journal title). Required for entity creation. # noqa: E501
-
- :param name: The name of this ContainerEntity. # noqa: E501
- :type: str
- """
-
- self._name = name
-
- @property
- def container_type(self):
- """Gets the container_type of this ContainerEntity. # noqa: E501
-
- Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501
-
- :return: The container_type of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._container_type
-
- @container_type.setter
- def container_type(self, container_type):
- """Sets the container_type of this ContainerEntity.
-
- Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501
-
- :param container_type: The container_type of this ContainerEntity. # noqa: E501
- :type: str
- """
-
- self._container_type = container_type
-
- @property
- def publication_status(self):
- """Gets the publication_status of this ContainerEntity. # noqa: E501
-
- Whether the container is active, discontinued, etc # noqa: E501
-
- :return: The publication_status of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._publication_status
-
- @publication_status.setter
- def publication_status(self, publication_status):
- """Sets the publication_status of this ContainerEntity.
-
- Whether the container is active, discontinued, etc # noqa: E501
-
- :param publication_status: The publication_status of this ContainerEntity. # noqa: E501
- :type: str
- """
-
- self._publication_status = publication_status
-
- @property
- def publisher(self):
- """Gets the publisher of this ContainerEntity. # noqa: E501
-
- Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501
-
- :return: The publisher of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._publisher
-
- @publisher.setter
- def publisher(self, publisher):
- """Sets the publisher of this ContainerEntity.
-
- Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501
-
- :param publisher: The publisher of this ContainerEntity. # noqa: E501
- :type: str
- """
-
- self._publisher = publisher
-
- @property
- def issnl(self):
- """Gets the issnl of this ContainerEntity. # noqa: E501
-
- Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501
-
- :return: The issnl of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._issnl
-
- @issnl.setter
- def issnl(self, issnl):
- """Sets the issnl of this ContainerEntity.
-
- Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501
-
- :param issnl: The issnl of this ContainerEntity. # noqa: E501
- :type: str
- """
- if issnl is not None and len(issnl) > 9:
- raise ValueError("Invalid value for `issnl`, length must be less than or equal to `9`") # noqa: E501
- if issnl is not None and len(issnl) < 9:
- raise ValueError("Invalid value for `issnl`, length must be greater than or equal to `9`") # noqa: E501
- if issnl is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issnl): # noqa: E501
- raise ValueError(r"Invalid value for `issnl`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
-
- self._issnl = issnl
-
- @property
- def issne(self):
- """Gets the issne of this ContainerEntity. # noqa: E501
-
- Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501
-
- :return: The issne of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._issne
-
- @issne.setter
- def issne(self, issne):
- """Sets the issne of this ContainerEntity.
-
- Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501
-
- :param issne: The issne of this ContainerEntity. # noqa: E501
- :type: str
- """
- if issne is not None and len(issne) > 9:
- raise ValueError("Invalid value for `issne`, length must be less than or equal to `9`") # noqa: E501
- if issne is not None and len(issne) < 9:
- raise ValueError("Invalid value for `issne`, length must be greater than or equal to `9`") # noqa: E501
- if issne is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issne): # noqa: E501
- raise ValueError(r"Invalid value for `issne`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
-
- self._issne = issne
-
- @property
- def issnp(self):
- """Gets the issnp of this ContainerEntity. # noqa: E501
-
- Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501
-
- :return: The issnp of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._issnp
-
- @issnp.setter
- def issnp(self, issnp):
- """Sets the issnp of this ContainerEntity.
-
- Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501
-
- :param issnp: The issnp of this ContainerEntity. # noqa: E501
- :type: str
- """
- if issnp is not None and len(issnp) > 9:
- raise ValueError("Invalid value for `issnp`, length must be less than or equal to `9`") # noqa: E501
- if issnp is not None and len(issnp) < 9:
- raise ValueError("Invalid value for `issnp`, length must be greater than or equal to `9`") # noqa: E501
- if issnp is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issnp): # noqa: E501
- raise ValueError(r"Invalid value for `issnp`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501
-
- self._issnp = issnp
-
- @property
- def wikidata_qid(self):
- """Gets the wikidata_qid of this ContainerEntity. # noqa: E501
-
-
- :return: The wikidata_qid of this ContainerEntity. # noqa: E501
- :rtype: str
- """
- return self._wikidata_qid
-
- @wikidata_qid.setter
- def wikidata_qid(self, wikidata_qid):
- """Sets the wikidata_qid of this ContainerEntity.
-
-
- :param wikidata_qid: The wikidata_qid of this ContainerEntity. # noqa: E501
- :type: str
- """
-
- self._wikidata_qid = wikidata_qid
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ContainerEntity):
- 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_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py
deleted file mode 100644
index d6a2df87..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class CreatorAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[CreatorEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """CreatorAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this CreatorAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this CreatorAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this CreatorAutoBatch.
-
-
- :param editgroup: The editgroup of this CreatorAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this CreatorAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this CreatorAutoBatch. # noqa: E501
- :rtype: list[CreatorEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this CreatorAutoBatch.
-
-
- :param entity_list: The entity_list of this CreatorAutoBatch. # noqa: E501
- :type: list[CreatorEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, CreatorAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/creator_entity.py b/python_openapi_client/fatcat_openapi_client/models/creator_entity.py
deleted file mode 100644
index 41d00b6e..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/creator_entity.py
+++ /dev/null
@@ -1,423 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class CreatorEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'display_name': 'str',
- 'given_name': 'str',
- 'surname': 'str',
- 'orcid': 'str',
- 'wikidata_qid': 'str'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'display_name': 'display_name',
- 'given_name': 'given_name',
- 'surname': 'surname',
- 'orcid': 'orcid',
- 'wikidata_qid': 'wikidata_qid'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, display_name=None, given_name=None, surname=None, orcid=None, wikidata_qid=None): # noqa: E501
- """CreatorEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._display_name = None
- self._given_name = None
- self._surname = None
- self._orcid = None
- self._wikidata_qid = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if display_name is not None:
- self.display_name = display_name
- if given_name is not None:
- self.given_name = given_name
- if surname is not None:
- self.surname = surname
- if orcid is not None:
- self.orcid = orcid
- if wikidata_qid is not None:
- self.wikidata_qid = wikidata_qid
-
- @property
- def state(self):
- """Gets the state of this CreatorEntity. # noqa: E501
-
-
- :return: The state of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this CreatorEntity.
-
-
- :param state: The state of this CreatorEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this CreatorEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this CreatorEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this CreatorEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this CreatorEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this CreatorEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this CreatorEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this CreatorEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this CreatorEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this CreatorEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this CreatorEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this CreatorEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this CreatorEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this CreatorEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this CreatorEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this CreatorEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this CreatorEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this CreatorEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def display_name(self):
- """Gets the display_name of this CreatorEntity. # noqa: E501
-
- Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. # noqa: E501
-
- :return: The display_name of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._display_name
-
- @display_name.setter
- def display_name(self, display_name):
- """Sets the display_name of this CreatorEntity.
-
- Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. # noqa: E501
-
- :param display_name: The display_name of this CreatorEntity. # noqa: E501
- :type: str
- """
-
- self._display_name = display_name
-
- @property
- def given_name(self):
- """Gets the given_name of this CreatorEntity. # noqa: E501
-
- In English commonly the first name, but ordering is context and culture specific. # noqa: E501
-
- :return: The given_name of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._given_name
-
- @given_name.setter
- def given_name(self, given_name):
- """Sets the given_name of this CreatorEntity.
-
- In English commonly the first name, but ordering is context and culture specific. # noqa: E501
-
- :param given_name: The given_name of this CreatorEntity. # noqa: E501
- :type: str
- """
-
- self._given_name = given_name
-
- @property
- def surname(self):
- """Gets the surname of this CreatorEntity. # noqa: E501
-
- In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501
-
- :return: The surname of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._surname
-
- @surname.setter
- def surname(self, surname):
- """Sets the surname of this CreatorEntity.
-
- In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501
-
- :param surname: The surname of this CreatorEntity. # noqa: E501
- :type: str
- """
-
- self._surname = surname
-
- @property
- def orcid(self):
- """Gets the orcid of this CreatorEntity. # noqa: E501
-
- ORCiD (https://orcid.org) identifier # noqa: E501
-
- :return: The orcid of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._orcid
-
- @orcid.setter
- def orcid(self, orcid):
- """Sets the orcid of this CreatorEntity.
-
- ORCiD (https://orcid.org) identifier # noqa: E501
-
- :param orcid: The orcid of this CreatorEntity. # noqa: E501
- :type: str
- """
- if orcid is not None and len(orcid) > 19:
- raise ValueError("Invalid value for `orcid`, length must be less than or equal to `19`") # noqa: E501
- if orcid is not None and len(orcid) < 19:
- raise ValueError("Invalid value for `orcid`, length must be greater than or equal to `19`") # noqa: E501
- if orcid is not None and not re.search(r'\d{4}-\d{4}-\d{4}-\d{3}[\dX]', orcid): # noqa: E501
- raise ValueError(r"Invalid value for `orcid`, must be a follow pattern or equal to `/\d{4}-\d{4}-\d{4}-\d{3}[\dX]/`") # noqa: E501
-
- self._orcid = orcid
-
- @property
- def wikidata_qid(self):
- """Gets the wikidata_qid of this CreatorEntity. # noqa: E501
-
- Wikidata entity QID # noqa: E501
-
- :return: The wikidata_qid of this CreatorEntity. # noqa: E501
- :rtype: str
- """
- return self._wikidata_qid
-
- @wikidata_qid.setter
- def wikidata_qid(self, wikidata_qid):
- """Sets the wikidata_qid of this CreatorEntity.
-
- Wikidata entity QID # noqa: E501
-
- :param wikidata_qid: The wikidata_qid of this CreatorEntity. # noqa: E501
- :type: str
- """
-
- self._wikidata_qid = wikidata_qid
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, CreatorEntity):
- 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_openapi_client/fatcat_openapi_client/models/editgroup.py b/python_openapi_client/fatcat_openapi_client/models/editgroup.py
deleted file mode 100644
index 37742d90..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/editgroup.py
+++ /dev/null
@@ -1,375 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class Editgroup(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup_id': 'str',
- 'editor_id': 'str',
- 'editor': 'Editor',
- 'changelog_index': 'int',
- 'created': 'datetime',
- 'submitted': 'datetime',
- 'description': 'str',
- 'extra': 'dict(str, object)',
- 'annotations': 'list[EditgroupAnnotation]',
- 'edits': 'EditgroupEdits'
- }
-
- attribute_map = {
- 'editgroup_id': 'editgroup_id',
- 'editor_id': 'editor_id',
- 'editor': 'editor',
- 'changelog_index': 'changelog_index',
- 'created': 'created',
- 'submitted': 'submitted',
- 'description': 'description',
- 'extra': 'extra',
- 'annotations': 'annotations',
- 'edits': 'edits'
- }
-
- def __init__(self, editgroup_id=None, editor_id=None, editor=None, changelog_index=None, created=None, submitted=None, description=None, extra=None, annotations=None, edits=None): # noqa: E501
- """Editgroup - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup_id = None
- self._editor_id = None
- self._editor = None
- self._changelog_index = None
- self._created = None
- self._submitted = None
- self._description = None
- self._extra = None
- self._annotations = None
- self._edits = None
- self.discriminator = None
-
- if editgroup_id is not None:
- self.editgroup_id = editgroup_id
- if editor_id is not None:
- self.editor_id = editor_id
- if editor is not None:
- self.editor = editor
- if changelog_index is not None:
- self.changelog_index = changelog_index
- if created is not None:
- self.created = created
- if submitted is not None:
- self.submitted = submitted
- if description is not None:
- self.description = description
- if extra is not None:
- self.extra = extra
- if annotations is not None:
- self.annotations = annotations
- if edits is not None:
- self.edits = edits
-
- @property
- def editgroup_id(self):
- """Gets the editgroup_id of this Editgroup. # noqa: E501
-
- Fatcat identifier for this editgroup. Assigned on creation. # noqa: E501
-
- :return: The editgroup_id of this Editgroup. # noqa: E501
- :rtype: str
- """
- return self._editgroup_id
-
- @editgroup_id.setter
- def editgroup_id(self, editgroup_id):
- """Sets the editgroup_id of this Editgroup.
-
- Fatcat identifier for this editgroup. Assigned on creation. # noqa: E501
-
- :param editgroup_id: The editgroup_id of this Editgroup. # noqa: E501
- :type: str
- """
- if editgroup_id is not None and len(editgroup_id) > 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501
- if editgroup_id is not None and len(editgroup_id) < 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501
- if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501
- raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editgroup_id = editgroup_id
-
- @property
- def editor_id(self):
- """Gets the editor_id of this Editgroup. # noqa: E501
-
- Fatcat identifer of editor that created this editgroup. # noqa: E501
-
- :return: The editor_id of this Editgroup. # noqa: E501
- :rtype: str
- """
- return self._editor_id
-
- @editor_id.setter
- def editor_id(self, editor_id):
- """Sets the editor_id of this Editgroup.
-
- Fatcat identifer of editor that created this editgroup. # noqa: E501
-
- :param editor_id: The editor_id of this Editgroup. # noqa: E501
- :type: str
- """
- 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:
- raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501
- if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501
- raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editor_id = editor_id
-
- @property
- def editor(self):
- """Gets the editor of this Editgroup. # noqa: E501
-
-
- :return: The editor of this Editgroup. # noqa: E501
- :rtype: Editor
- """
- return self._editor
-
- @editor.setter
- def editor(self, editor):
- """Sets the editor of this Editgroup.
-
-
- :param editor: The editor of this Editgroup. # noqa: E501
- :type: Editor
- """
-
- self._editor = editor
-
- @property
- def changelog_index(self):
- """Gets the changelog_index of this Editgroup. # noqa: E501
-
- For accepted/merged editgroups, the changelog index that the accept occured at. WARNING: not populated in all contexts that an editgroup could be included in a response. # noqa: E501
-
- :return: The changelog_index of this Editgroup. # noqa: E501
- :rtype: int
- """
- return self._changelog_index
-
- @changelog_index.setter
- def changelog_index(self, changelog_index):
- """Sets the changelog_index of this Editgroup.
-
- For accepted/merged editgroups, the changelog index that the accept occured at. WARNING: not populated in all contexts that an editgroup could be included in a response. # noqa: E501
-
- :param changelog_index: The changelog_index of this Editgroup. # noqa: E501
- :type: int
- """
-
- self._changelog_index = changelog_index
-
- @property
- def created(self):
- """Gets the created of this Editgroup. # noqa: E501
-
- Timestamp when this editgroup was first created. # noqa: E501
-
- :return: The created of this Editgroup. # noqa: E501
- :rtype: datetime
- """
- return self._created
-
- @created.setter
- def created(self, created):
- """Sets the created of this Editgroup.
-
- Timestamp when this editgroup was first created. # noqa: E501
-
- :param created: The created of this Editgroup. # noqa: E501
- :type: datetime
- """
-
- self._created = created
-
- @property
- def submitted(self):
- """Gets the submitted of this Editgroup. # noqa: E501
-
- Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. # noqa: E501
-
- :return: The submitted of this Editgroup. # noqa: E501
- :rtype: datetime
- """
- return self._submitted
-
- @submitted.setter
- def submitted(self, submitted):
- """Sets the submitted of this Editgroup.
-
- Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. # noqa: E501
-
- :param submitted: The submitted of this Editgroup. # noqa: E501
- :type: datetime
- """
-
- self._submitted = submitted
-
- @property
- def description(self):
- """Gets the description of this Editgroup. # noqa: E501
-
- Comment describing the changes in this editgroup. Can be updated with PUT request. # noqa: E501
-
- :return: The description of this Editgroup. # noqa: E501
- :rtype: str
- """
- return self._description
-
- @description.setter
- def description(self, description):
- """Sets the description of this Editgroup.
-
- Comment describing the changes in this editgroup. Can be updated with PUT request. # noqa: E501
-
- :param description: The description of this Editgroup. # noqa: E501
- :type: str
- """
-
- self._description = description
-
- @property
- def extra(self):
- """Gets the extra of this Editgroup. # noqa: E501
-
- Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. # noqa: E501
-
- :return: The extra of this Editgroup. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this Editgroup.
-
- Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. # noqa: E501
-
- :param extra: The extra of this Editgroup. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def annotations(self):
- """Gets the annotations of this Editgroup. # noqa: E501
-
- Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. # noqa: E501
-
- :return: The annotations of this Editgroup. # noqa: E501
- :rtype: list[EditgroupAnnotation]
- """
- return self._annotations
-
- @annotations.setter
- def annotations(self, annotations):
- """Sets the annotations of this Editgroup.
-
- Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. # noqa: E501
-
- :param annotations: The annotations of this Editgroup. # noqa: E501
- :type: list[EditgroupAnnotation]
- """
-
- self._annotations = annotations
-
- @property
- def edits(self):
- """Gets the edits of this Editgroup. # noqa: E501
-
-
- :return: The edits of this Editgroup. # noqa: E501
- :rtype: EditgroupEdits
- """
- return self._edits
-
- @edits.setter
- def edits(self, edits):
- """Sets the edits of this Editgroup.
-
-
- :param edits: The edits of this Editgroup. # noqa: E501
- :type: EditgroupEdits
- """
-
- self._edits = edits
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, Editgroup):
- 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_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py
deleted file mode 100644
index 81868060..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py
+++ /dev/null
@@ -1,297 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class EditgroupAnnotation(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'annotation_id': 'str',
- 'editgroup_id': 'str',
- 'editor_id': 'str',
- 'editor': 'Editor',
- 'created': 'datetime',
- 'comment_markdown': 'str',
- 'extra': 'dict(str, object)'
- }
-
- attribute_map = {
- 'annotation_id': 'annotation_id',
- 'editgroup_id': 'editgroup_id',
- 'editor_id': 'editor_id',
- 'editor': 'editor',
- 'created': 'created',
- 'comment_markdown': 'comment_markdown',
- 'extra': 'extra'
- }
-
- def __init__(self, annotation_id=None, editgroup_id=None, editor_id=None, editor=None, created=None, comment_markdown=None, extra=None): # noqa: E501
- """EditgroupAnnotation - a model defined in OpenAPI""" # noqa: E501
-
- self._annotation_id = None
- self._editgroup_id = None
- self._editor_id = None
- self._editor = None
- self._created = None
- self._comment_markdown = None
- self._extra = None
- self.discriminator = None
-
- if annotation_id is not None:
- self.annotation_id = annotation_id
- if editgroup_id is not None:
- self.editgroup_id = editgroup_id
- if editor_id is not None:
- self.editor_id = editor_id
- if editor is not None:
- self.editor = editor
- if created is not None:
- self.created = created
- if comment_markdown is not None:
- self.comment_markdown = comment_markdown
- if extra is not None:
- self.extra = extra
-
- @property
- def annotation_id(self):
- """Gets the annotation_id of this EditgroupAnnotation. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The annotation_id of this EditgroupAnnotation. # noqa: E501
- :rtype: str
- """
- return self._annotation_id
-
- @annotation_id.setter
- def annotation_id(self, annotation_id):
- """Sets the annotation_id of this EditgroupAnnotation.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param annotation_id: The annotation_id of this EditgroupAnnotation. # noqa: E501
- :type: str
- """
- if annotation_id is not None and len(annotation_id) > 36:
- raise ValueError("Invalid value for `annotation_id`, length must be less than or equal to `36`") # noqa: E501
- if annotation_id is not None and len(annotation_id) < 36:
- raise ValueError("Invalid value for `annotation_id`, length must be greater than or equal to `36`") # noqa: E501
- if annotation_id is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', annotation_id): # noqa: E501
- raise ValueError(r"Invalid value for `annotation_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._annotation_id = annotation_id
-
- @property
- def editgroup_id(self):
- """Gets the editgroup_id of this EditgroupAnnotation. # noqa: E501
-
- Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. # noqa: E501
-
- :return: The editgroup_id of this EditgroupAnnotation. # noqa: E501
- :rtype: str
- """
- return self._editgroup_id
-
- @editgroup_id.setter
- def editgroup_id(self, editgroup_id):
- """Sets the editgroup_id of this EditgroupAnnotation.
-
- Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. # noqa: E501
-
- :param editgroup_id: The editgroup_id of this EditgroupAnnotation. # noqa: E501
- :type: str
- """
- if editgroup_id is not None and len(editgroup_id) > 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501
- if editgroup_id is not None and len(editgroup_id) < 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501
- if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501
- raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editgroup_id = editgroup_id
-
- @property
- def editor_id(self):
- """Gets the editor_id of this EditgroupAnnotation. # noqa: E501
-
- Defaults to editor created the annotation via POST request. # noqa: E501
-
- :return: The editor_id of this EditgroupAnnotation. # noqa: E501
- :rtype: str
- """
- return self._editor_id
-
- @editor_id.setter
- def editor_id(self, editor_id):
- """Sets the editor_id of this EditgroupAnnotation.
-
- Defaults to editor created the annotation via POST request. # noqa: E501
-
- :param editor_id: The editor_id of this EditgroupAnnotation. # noqa: E501
- :type: str
- """
- 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:
- raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501
- if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501
- raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editor_id = editor_id
-
- @property
- def editor(self):
- """Gets the editor of this EditgroupAnnotation. # noqa: E501
-
-
- :return: The editor of this EditgroupAnnotation. # noqa: E501
- :rtype: Editor
- """
- return self._editor
-
- @editor.setter
- def editor(self, editor):
- """Sets the editor of this EditgroupAnnotation.
-
-
- :param editor: The editor of this EditgroupAnnotation. # noqa: E501
- :type: Editor
- """
-
- self._editor = editor
-
- @property
- def created(self):
- """Gets the created of this EditgroupAnnotation. # noqa: E501
-
- Timestamp when annotation was first created. # noqa: E501
-
- :return: The created of this EditgroupAnnotation. # noqa: E501
- :rtype: datetime
- """
- return self._created
-
- @created.setter
- def created(self, created):
- """Sets the created of this EditgroupAnnotation.
-
- Timestamp when annotation was first created. # noqa: E501
-
- :param created: The created of this EditgroupAnnotation. # noqa: E501
- :type: datetime
- """
-
- self._created = created
-
- @property
- def comment_markdown(self):
- """Gets the comment_markdown of this EditgroupAnnotation. # noqa: E501
-
-
- :return: The comment_markdown of this EditgroupAnnotation. # noqa: E501
- :rtype: str
- """
- return self._comment_markdown
-
- @comment_markdown.setter
- def comment_markdown(self, comment_markdown):
- """Sets the comment_markdown of this EditgroupAnnotation.
-
-
- :param comment_markdown: The comment_markdown of this EditgroupAnnotation. # noqa: E501
- :type: str
- """
-
- self._comment_markdown = comment_markdown
-
- @property
- def extra(self):
- """Gets the extra of this EditgroupAnnotation. # noqa: E501
-
- Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. # noqa: E501
-
- :return: The extra of this EditgroupAnnotation. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this EditgroupAnnotation.
-
- Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. # noqa: E501
-
- :param extra: The extra of this EditgroupAnnotation. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, EditgroupAnnotation):
- 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_openapi_client/fatcat_openapi_client/models/editgroup_edits.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py
deleted file mode 100644
index 39340ce9..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py
+++ /dev/null
@@ -1,269 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class EditgroupEdits(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'containers': 'list[EntityEdit]',
- 'creators': 'list[EntityEdit]',
- 'files': 'list[EntityEdit]',
- 'filesets': 'list[EntityEdit]',
- 'webcaptures': 'list[EntityEdit]',
- 'releases': 'list[EntityEdit]',
- 'works': 'list[EntityEdit]'
- }
-
- attribute_map = {
- 'containers': 'containers',
- 'creators': 'creators',
- 'files': 'files',
- 'filesets': 'filesets',
- 'webcaptures': 'webcaptures',
- 'releases': 'releases',
- 'works': 'works'
- }
-
- def __init__(self, containers=None, creators=None, files=None, filesets=None, webcaptures=None, releases=None, works=None): # noqa: E501
- """EditgroupEdits - a model defined in OpenAPI""" # noqa: E501
-
- self._containers = None
- self._creators = None
- self._files = None
- self._filesets = None
- self._webcaptures = None
- self._releases = None
- self._works = None
- self.discriminator = None
-
- if containers is not None:
- self.containers = containers
- if creators is not None:
- self.creators = creators
- if files is not None:
- self.files = files
- if filesets is not None:
- self.filesets = filesets
- if webcaptures is not None:
- self.webcaptures = webcaptures
- if releases is not None:
- self.releases = releases
- if works is not None:
- self.works = works
-
- @property
- def containers(self):
- """Gets the containers of this EditgroupEdits. # noqa: E501
-
-
- :return: The containers of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._containers
-
- @containers.setter
- def containers(self, containers):
- """Sets the containers of this EditgroupEdits.
-
-
- :param containers: The containers of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._containers = containers
-
- @property
- def creators(self):
- """Gets the creators of this EditgroupEdits. # noqa: E501
-
-
- :return: The creators of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._creators
-
- @creators.setter
- def creators(self, creators):
- """Sets the creators of this EditgroupEdits.
-
-
- :param creators: The creators of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._creators = creators
-
- @property
- def files(self):
- """Gets the files of this EditgroupEdits. # noqa: E501
-
-
- :return: The files of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._files
-
- @files.setter
- def files(self, files):
- """Sets the files of this EditgroupEdits.
-
-
- :param files: The files of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._files = files
-
- @property
- def filesets(self):
- """Gets the filesets of this EditgroupEdits. # noqa: E501
-
-
- :return: The filesets of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._filesets
-
- @filesets.setter
- def filesets(self, filesets):
- """Sets the filesets of this EditgroupEdits.
-
-
- :param filesets: The filesets of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._filesets = filesets
-
- @property
- def webcaptures(self):
- """Gets the webcaptures of this EditgroupEdits. # noqa: E501
-
-
- :return: The webcaptures of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._webcaptures
-
- @webcaptures.setter
- def webcaptures(self, webcaptures):
- """Sets the webcaptures of this EditgroupEdits.
-
-
- :param webcaptures: The webcaptures of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._webcaptures = webcaptures
-
- @property
- def releases(self):
- """Gets the releases of this EditgroupEdits. # noqa: E501
-
-
- :return: The releases of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._releases
-
- @releases.setter
- def releases(self, releases):
- """Sets the releases of this EditgroupEdits.
-
-
- :param releases: The releases of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._releases = releases
-
- @property
- def works(self):
- """Gets the works of this EditgroupEdits. # noqa: E501
-
-
- :return: The works of this EditgroupEdits. # noqa: E501
- :rtype: list[EntityEdit]
- """
- return self._works
-
- @works.setter
- def works(self, works):
- """Sets the works of this EditgroupEdits.
-
-
- :param works: The works of this EditgroupEdits. # noqa: E501
- :type: list[EntityEdit]
- """
-
- self._works = works
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, EditgroupEdits):
- 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_openapi_client/fatcat_openapi_client/models/editor.py b/python_openapi_client/fatcat_openapi_client/models/editor.py
deleted file mode 100644
index d526531e..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/editor.py
+++ /dev/null
@@ -1,234 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class Editor(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editor_id': 'str',
- 'username': 'str',
- 'is_admin': 'bool',
- 'is_bot': 'bool',
- 'is_active': 'bool'
- }
-
- attribute_map = {
- 'editor_id': 'editor_id',
- 'username': 'username',
- 'is_admin': 'is_admin',
- 'is_bot': 'is_bot',
- 'is_active': 'is_active'
- }
-
- def __init__(self, editor_id=None, username=None, is_admin=None, is_bot=None, is_active=None): # noqa: E501
- """Editor - a model defined in OpenAPI""" # 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):
- """Gets the editor_id of this Editor. # noqa: E501
-
- Fatcat identifier for the editor. Can not be changed. # noqa: E501
-
- :return: The editor_id of this Editor. # noqa: E501
- :rtype: str
- """
- return self._editor_id
-
- @editor_id.setter
- def editor_id(self, editor_id):
- """Sets the editor_id of this Editor.
-
- Fatcat identifier for the editor. Can not be changed. # noqa: E501
-
- :param editor_id: The editor_id of this Editor. # noqa: E501
- :type: str
- """
- 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:
- raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501
- if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501
- raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editor_id = editor_id
-
- @property
- def username(self):
- """Gets the username of this Editor. # noqa: E501
-
- Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifer. # noqa: E501
-
- :return: The username of this Editor. # noqa: E501
- :rtype: str
- """
- return self._username
-
- @username.setter
- def username(self, username):
- """Sets the username of this Editor.
-
- Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifer. # noqa: E501
-
- :param username: The username of this Editor. # noqa: E501
- :type: str
- """
- if username is None:
- raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501
-
- self._username = username
-
- @property
- def is_admin(self):
- """Gets the is_admin of this Editor. # noqa: E501
-
- Whether this editor has the `admin` role. # 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.
-
- Whether this editor has the `admin` role. # noqa: E501
-
- :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
-
- Whether this editor is a bot (as opposed to a human making manual edits) # 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.
-
- Whether this editor is a bot (as opposed to a human making manual edits) # noqa: E501
-
- :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
-
- Whether this editor's account is enabled (if not API tokens and web logins will not work). # 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.
-
- Whether this editor's account is enabled (if not API tokens and web logins will not work). # noqa: E501
-
- :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 = {}
-
- for attr, _ in six.iteritems(self.openapi_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, Editor):
- 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_openapi_client/fatcat_openapi_client/models/entity_edit.py b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py
deleted file mode 100644
index be35815f..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py
+++ /dev/null
@@ -1,320 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class EntityEdit(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'edit_id': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'prev_revision': 'str',
- 'redirect_ident': 'str',
- 'editgroup_id': 'str',
- 'extra': 'dict(str, object)'
- }
-
- attribute_map = {
- 'edit_id': 'edit_id',
- 'ident': 'ident',
- 'revision': 'revision',
- 'prev_revision': 'prev_revision',
- 'redirect_ident': 'redirect_ident',
- 'editgroup_id': 'editgroup_id',
- 'extra': 'extra'
- }
-
- def __init__(self, edit_id=None, ident=None, revision=None, prev_revision=None, redirect_ident=None, editgroup_id=None, extra=None): # noqa: E501
- """EntityEdit - a model defined in OpenAPI""" # noqa: E501
-
- self._edit_id = None
- self._ident = None
- self._revision = None
- self._prev_revision = None
- self._redirect_ident = None
- self._editgroup_id = None
- self._extra = None
- self.discriminator = None
-
- self.edit_id = edit_id
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if prev_revision is not None:
- self.prev_revision = prev_revision
- if redirect_ident is not None:
- self.redirect_ident = redirect_ident
- self.editgroup_id = editgroup_id
- if extra is not None:
- self.extra = extra
-
- @property
- def edit_id(self):
- """Gets the edit_id of this EntityEdit. # noqa: E501
-
- Unique UUID for this specific edit object. # noqa: E501
-
- :return: The edit_id of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._edit_id
-
- @edit_id.setter
- def edit_id(self, edit_id):
- """Sets the edit_id of this EntityEdit.
-
- Unique UUID for this specific edit object. # noqa: E501
-
- :param edit_id: The edit_id of this EntityEdit. # noqa: E501
- :type: str
- """
- if edit_id is None:
- raise ValueError("Invalid value for `edit_id`, must not be `None`") # noqa: E501
- if edit_id is not None and len(edit_id) > 36:
- raise ValueError("Invalid value for `edit_id`, length must be less than or equal to `36`") # noqa: E501
- if edit_id is not None and len(edit_id) < 36:
- raise ValueError("Invalid value for `edit_id`, length must be greater than or equal to `36`") # noqa: E501
- if edit_id is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501
- raise ValueError(r"Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._edit_id = edit_id
-
- @property
- def ident(self):
- """Gets the ident of this EntityEdit. # noqa: E501
-
- Fatcat identifier of the entity this edit is mutating. # noqa: E501
-
- :return: The ident of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this EntityEdit.
-
- Fatcat identifier of the entity this edit is mutating. # noqa: E501
-
- :param ident: The ident of this EntityEdit. # noqa: E501
- :type: str
- """
- if ident is None:
- raise ValueError("Invalid value for `ident`, must not be `None`") # noqa: E501
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this EntityEdit. # noqa: E501
-
- Entity revision that this edit will set the entity to. May be `null` in the case of deletions. # noqa: E501
-
- :return: The revision of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this EntityEdit.
-
- Entity revision that this edit will set the entity to. May be `null` in the case of deletions. # noqa: E501
-
- :param revision: The revision of this EntityEdit. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def prev_revision(self):
- """Gets the prev_revision of this EntityEdit. # noqa: E501
-
- Revision of entity just before this edit. May be used in the future to prevent edit race conditions. # noqa: E501
-
- :return: The prev_revision of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._prev_revision
-
- @prev_revision.setter
- def prev_revision(self, prev_revision):
- """Sets the prev_revision of this EntityEdit.
-
- Revision of entity just before this edit. May be used in the future to prevent edit race conditions. # noqa: E501
-
- :param prev_revision: The prev_revision of this EntityEdit. # noqa: E501
- :type: str
- """
- if prev_revision is not None and len(prev_revision) > 36:
- raise ValueError("Invalid value for `prev_revision`, length must be less than or equal to `36`") # noqa: E501
- if prev_revision is not None and len(prev_revision) < 36:
- raise ValueError("Invalid value for `prev_revision`, length must be greater than or equal to `36`") # noqa: E501
- if prev_revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501
- raise ValueError(r"Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._prev_revision = prev_revision
-
- @property
- def redirect_ident(self):
- """Gets the redirect_ident of this EntityEdit. # noqa: E501
-
- When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. # noqa: E501
-
- :return: The redirect_ident of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._redirect_ident
-
- @redirect_ident.setter
- def redirect_ident(self, redirect_ident):
- """Sets the redirect_ident of this EntityEdit.
-
- When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. # noqa: E501
-
- :param redirect_ident: The redirect_ident of this EntityEdit. # noqa: E501
- :type: str
- """
- if redirect_ident is not None and len(redirect_ident) > 26:
- raise ValueError("Invalid value for `redirect_ident`, length must be less than or equal to `26`") # noqa: E501
- if redirect_ident is not None and len(redirect_ident) < 26:
- raise ValueError("Invalid value for `redirect_ident`, length must be greater than or equal to `26`") # noqa: E501
- if redirect_ident is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501
- raise ValueError(r"Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect_ident = redirect_ident
-
- @property
- def editgroup_id(self):
- """Gets the editgroup_id of this EntityEdit. # noqa: E501
-
- Editgroup identifier that this edit is part of. # noqa: E501
-
- :return: The editgroup_id of this EntityEdit. # noqa: E501
- :rtype: str
- """
- return self._editgroup_id
-
- @editgroup_id.setter
- def editgroup_id(self, editgroup_id):
- """Sets the editgroup_id of this EntityEdit.
-
- Editgroup identifier that this edit is part of. # noqa: E501
-
- :param editgroup_id: The editgroup_id of this EntityEdit. # noqa: E501
- :type: str
- """
- if editgroup_id is None:
- raise ValueError("Invalid value for `editgroup_id`, must not be `None`") # noqa: E501
- if editgroup_id is not None and len(editgroup_id) > 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501
- if editgroup_id is not None and len(editgroup_id) < 26:
- raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501
- if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501
- raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._editgroup_id = editgroup_id
-
- @property
- def extra(self):
- """Gets the extra of this EntityEdit. # noqa: E501
-
-
- :return: The extra of this EntityEdit. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this EntityEdit.
-
-
- :param extra: The extra of this EntityEdit. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, EntityEdit):
- 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_openapi_client/fatcat_openapi_client/models/entity_history_entry.py b/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py
deleted file mode 100644
index 14639b1a..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class EntityHistoryEntry(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'edit': 'EntityEdit',
- 'editgroup': 'Editgroup',
- 'changelog_entry': 'ChangelogEntry'
- }
-
- attribute_map = {
- 'edit': 'edit',
- 'editgroup': 'editgroup',
- 'changelog_entry': 'changelog_entry'
- }
-
- def __init__(self, edit=None, editgroup=None, changelog_entry=None): # noqa: E501
- """EntityHistoryEntry - a model defined in OpenAPI""" # noqa: E501
-
- self._edit = None
- self._editgroup = None
- self._changelog_entry = None
- self.discriminator = None
-
- self.edit = edit
- self.editgroup = editgroup
- self.changelog_entry = changelog_entry
-
- @property
- def edit(self):
- """Gets the edit of this EntityHistoryEntry. # noqa: E501
-
-
- :return: The edit of this EntityHistoryEntry. # noqa: E501
- :rtype: EntityEdit
- """
- return self._edit
-
- @edit.setter
- def edit(self, edit):
- """Sets the edit of this EntityHistoryEntry.
-
-
- :param edit: The edit of this EntityHistoryEntry. # noqa: E501
- :type: EntityEdit
- """
- if edit is None:
- raise ValueError("Invalid value for `edit`, must not be `None`") # noqa: E501
-
- self._edit = edit
-
- @property
- def editgroup(self):
- """Gets the editgroup of this EntityHistoryEntry. # noqa: E501
-
-
- :return: The editgroup of this EntityHistoryEntry. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this EntityHistoryEntry.
-
-
- :param editgroup: The editgroup of this EntityHistoryEntry. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def changelog_entry(self):
- """Gets the changelog_entry of this EntityHistoryEntry. # noqa: E501
-
-
- :return: The changelog_entry of this EntityHistoryEntry. # noqa: E501
- :rtype: ChangelogEntry
- """
- return self._changelog_entry
-
- @changelog_entry.setter
- def changelog_entry(self, changelog_entry):
- """Sets the changelog_entry of this EntityHistoryEntry.
-
-
- :param changelog_entry: The changelog_entry of this EntityHistoryEntry. # noqa: E501
- :type: ChangelogEntry
- """
- if changelog_entry is None:
- raise ValueError("Invalid value for `changelog_entry`, must not be `None`") # noqa: E501
-
- self._changelog_entry = changelog_entry
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, EntityHistoryEntry):
- 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_openapi_client/fatcat_openapi_client/models/error_response.py b/python_openapi_client/fatcat_openapi_client/models/error_response.py
deleted file mode 100644
index 3406c52e..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/error_response.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ErrorResponse(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'success': 'bool',
- 'error': 'str',
- 'message': 'str'
- }
-
- attribute_map = {
- 'success': 'success',
- 'error': 'error',
- 'message': 'message'
- }
-
- def __init__(self, success=None, error=None, message=None): # noqa: E501
- """ErrorResponse - a model defined in OpenAPI""" # noqa: E501
-
- self._success = None
- self._error = None
- self._message = None
- self.discriminator = None
-
- self.success = success
- self.error = error
- self.message = message
-
- @property
- def success(self):
- """Gets the success of this ErrorResponse. # noqa: E501
-
-
- :return: The success of this ErrorResponse. # noqa: E501
- :rtype: bool
- """
- return self._success
-
- @success.setter
- def success(self, success):
- """Sets the success of this ErrorResponse.
-
-
- :param success: The success of this ErrorResponse. # noqa: E501
- :type: bool
- """
- if success is None:
- raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501
-
- self._success = success
-
- @property
- def error(self):
- """Gets the error of this ErrorResponse. # noqa: E501
-
-
- :return: The error of this ErrorResponse. # noqa: E501
- :rtype: str
- """
- return self._error
-
- @error.setter
- def error(self, error):
- """Sets the error of this ErrorResponse.
-
-
- :param error: The error of this ErrorResponse. # noqa: E501
- :type: str
- """
- if error is None:
- raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501
-
- self._error = error
-
- @property
- def message(self):
- """Gets the message of this ErrorResponse. # noqa: E501
-
-
- :return: The message of this ErrorResponse. # noqa: E501
- :rtype: str
- """
- return self._message
-
- @message.setter
- def message(self, message):
- """Sets the message of this ErrorResponse.
-
-
- :param message: The message of this ErrorResponse. # noqa: E501
- :type: str
- """
- if message is None:
- raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
-
- self._message = message
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ErrorResponse):
- 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_openapi_client/fatcat_openapi_client/models/file_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py
deleted file mode 100644
index b34f5401..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FileAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[FileEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """FileAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this FileAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this FileAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this FileAutoBatch.
-
-
- :param editgroup: The editgroup of this FileAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this FileAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this FileAutoBatch. # noqa: E501
- :rtype: list[FileEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this FileAutoBatch.
-
-
- :param entity_list: The entity_list of this FileAutoBatch. # noqa: E501
- :type: list[FileEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FileAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/file_entity.py b/python_openapi_client/fatcat_openapi_client/models/file_entity.py
deleted file mode 100644
index d97a0a03..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/file_entity.py
+++ /dev/null
@@ -1,541 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.5.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FileEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'size': 'int',
- 'md5': 'str',
- 'sha1': 'str',
- 'sha256': 'str',
- 'urls': 'list[FileUrl]',
- 'mimetype': 'str',
- 'content_scope': 'str',
- 'release_ids': 'list[str]',
- 'releases': 'list[ReleaseEntity]'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'size': 'size',
- 'md5': 'md5',
- 'sha1': 'sha1',
- 'sha256': 'sha256',
- 'urls': 'urls',
- 'mimetype': 'mimetype',
- 'content_scope': 'content_scope',
- 'release_ids': 'release_ids',
- 'releases': 'releases'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, size=None, md5=None, sha1=None, sha256=None, urls=None, mimetype=None, content_scope=None, release_ids=None, releases=None): # noqa: E501
- """FileEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._size = None
- self._md5 = None
- self._sha1 = None
- self._sha256 = None
- self._urls = None
- self._mimetype = None
- self._content_scope = None
- self._release_ids = None
- self._releases = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if size is not None:
- self.size = size
- if md5 is not None:
- self.md5 = md5
- if sha1 is not None:
- self.sha1 = sha1
- if sha256 is not None:
- self.sha256 = sha256
- if urls is not None:
- self.urls = urls
- if mimetype is not None:
- self.mimetype = mimetype
- if content_scope is not None:
- self.content_scope = content_scope
- if release_ids is not None:
- self.release_ids = release_ids
- if releases is not None:
- self.releases = releases
-
- @property
- def state(self):
- """Gets the state of this FileEntity. # noqa: E501
-
-
- :return: The state of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this FileEntity.
-
-
- :param state: The state of this FileEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this FileEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this FileEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this FileEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this FileEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this FileEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this FileEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this FileEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this FileEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this FileEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this FileEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this FileEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this FileEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this FileEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this FileEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this FileEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this FileEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this FileEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def size(self):
- """Gets the size of this FileEntity. # noqa: E501
-
- Size of file in bytes. Non-zero. # noqa: E501
-
- :return: The size of this FileEntity. # noqa: E501
- :rtype: int
- """
- return self._size
-
- @size.setter
- def size(self, size):
- """Sets the size of this FileEntity.
-
- Size of file in bytes. Non-zero. # noqa: E501
-
- :param size: The size of this FileEntity. # noqa: E501
- :type: int
- """
-
- self._size = size
-
- @property
- def md5(self):
- """Gets the md5 of this FileEntity. # noqa: E501
-
- MD5 hash of data, in hex encoding # noqa: E501
-
- :return: The md5 of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._md5
-
- @md5.setter
- def md5(self, md5):
- """Sets the md5 of this FileEntity.
-
- MD5 hash of data, in hex encoding # noqa: E501
-
- :param md5: The md5 of this FileEntity. # noqa: E501
- :type: str
- """
- if md5 is not None and len(md5) > 32:
- raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501
- if md5 is not None and len(md5) < 32:
- raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501
- if md5 is not None and not re.search(r'[a-f0-9]{32}', md5): # noqa: E501
- raise ValueError(r"Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501
-
- self._md5 = md5
-
- @property
- def sha1(self):
- """Gets the sha1 of this FileEntity. # noqa: E501
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :return: The sha1 of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._sha1
-
- @sha1.setter
- def sha1(self, sha1):
- """Sets the sha1 of this FileEntity.
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :param sha1: The sha1 of this FileEntity. # noqa: E501
- :type: str
- """
- if sha1 is not None and len(sha1) > 40:
- raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501
- if sha1 is not None and len(sha1) < 40:
- raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501
- if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501
- raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501
-
- self._sha1 = sha1
-
- @property
- def sha256(self):
- """Gets the sha256 of this FileEntity. # noqa: E501
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :return: The sha256 of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._sha256
-
- @sha256.setter
- def sha256(self, sha256):
- """Sets the sha256 of this FileEntity.
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :param sha256: The sha256 of this FileEntity. # noqa: E501
- :type: str
- """
- if sha256 is not None and len(sha256) > 64:
- raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501
- if sha256 is not None and len(sha256) < 64:
- raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501
- if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501
- raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501
-
- self._sha256 = sha256
-
- @property
- def urls(self):
- """Gets the urls of this FileEntity. # noqa: E501
-
-
- :return: The urls of this FileEntity. # noqa: E501
- :rtype: list[FileUrl]
- """
- return self._urls
-
- @urls.setter
- def urls(self, urls):
- """Sets the urls of this FileEntity.
-
-
- :param urls: The urls of this FileEntity. # noqa: E501
- :type: list[FileUrl]
- """
-
- self._urls = urls
-
- @property
- def mimetype(self):
- """Gets the mimetype of this FileEntity. # noqa: E501
-
-
- :return: The mimetype of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._mimetype
-
- @mimetype.setter
- def mimetype(self, mimetype):
- """Sets the mimetype of this FileEntity.
-
-
- :param mimetype: The mimetype of this FileEntity. # noqa: E501
- :type: str
- """
-
- self._mimetype = mimetype
-
- @property
- def content_scope(self):
- """Gets the content_scope of this FileEntity. # noqa: E501
-
-
- :return: The content_scope of this FileEntity. # noqa: E501
- :rtype: str
- """
- return self._content_scope
-
- @content_scope.setter
- def content_scope(self, content_scope):
- """Sets the content_scope of this FileEntity.
-
-
- :param content_scope: The content_scope of this FileEntity. # noqa: E501
- :type: str
- """
-
- self._content_scope = content_scope
-
- @property
- def release_ids(self):
- """Gets the release_ids of this FileEntity. # noqa: E501
-
- Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). # noqa: E501
-
- :return: The release_ids of this FileEntity. # noqa: E501
- :rtype: list[str]
- """
- return self._release_ids
-
- @release_ids.setter
- def release_ids(self, release_ids):
- """Sets the release_ids of this FileEntity.
-
- Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). # noqa: E501
-
- :param release_ids: The release_ids of this FileEntity. # noqa: E501
- :type: list[str]
- """
-
- self._release_ids = release_ids
-
- @property
- def releases(self):
- """Gets the releases of this FileEntity. # noqa: E501
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :return: The releases of this FileEntity. # noqa: E501
- :rtype: list[ReleaseEntity]
- """
- return self._releases
-
- @releases.setter
- def releases(self, releases):
- """Sets the releases of this FileEntity.
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :param releases: The releases of this FileEntity. # noqa: E501
- :type: list[ReleaseEntity]
- """
-
- self._releases = releases
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FileEntity):
- 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_openapi_client/fatcat_openapi_client/models/file_url.py b/python_openapi_client/fatcat_openapi_client/models/file_url.py
deleted file mode 100644
index 6dc8ebe6..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/file_url.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FileUrl(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'url': 'str',
- 'rel': 'str'
- }
-
- attribute_map = {
- 'url': 'url',
- 'rel': 'rel'
- }
-
- def __init__(self, url=None, rel=None): # noqa: E501
- """FileUrl - a model defined in OpenAPI""" # noqa: E501
-
- self._url = None
- self._rel = None
- self.discriminator = None
-
- self.url = url
- self.rel = rel
-
- @property
- def url(self):
- """Gets the url of this FileUrl. # noqa: E501
-
- URL/URI pointing directly to a machine retrievable copy of this exact file. # noqa: E501
-
- :return: The url of this FileUrl. # noqa: E501
- :rtype: str
- """
- return self._url
-
- @url.setter
- def url(self, url):
- """Sets the url of this FileUrl.
-
- URL/URI pointing directly to a machine retrievable copy of this exact file. # noqa: E501
-
- :param url: The url of this FileUrl. # noqa: E501
- :type: str
- """
- if url is None:
- raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
-
- self._url = url
-
- @property
- def rel(self):
- """Gets the rel of this FileUrl. # noqa: E501
-
- Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values. # noqa: E501
-
- :return: The rel of this FileUrl. # noqa: E501
- :rtype: str
- """
- return self._rel
-
- @rel.setter
- def rel(self, rel):
- """Sets the rel of this FileUrl.
-
- Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values. # noqa: E501
-
- :param rel: The rel of this FileUrl. # noqa: E501
- :type: str
- """
- if rel is None:
- raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501
-
- self._rel = rel
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FileUrl):
- 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_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py
deleted file mode 100644
index d3a15279..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FilesetAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[FilesetEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """FilesetAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this FilesetAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this FilesetAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this FilesetAutoBatch.
-
-
- :param editgroup: The editgroup of this FilesetAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this FilesetAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this FilesetAutoBatch. # noqa: E501
- :rtype: list[FilesetEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this FilesetAutoBatch.
-
-
- :param entity_list: The entity_list of this FilesetAutoBatch. # noqa: E501
- :type: list[FilesetEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FilesetAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/fileset_entity.py b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py
deleted file mode 100644
index dfc0787a..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py
+++ /dev/null
@@ -1,411 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.5.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FilesetEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'content_scope': 'str',
- 'manifest': 'list[FilesetFile]',
- 'urls': 'list[FilesetUrl]',
- 'release_ids': 'list[str]',
- 'releases': 'list[ReleaseEntity]'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'content_scope': 'content_scope',
- 'manifest': 'manifest',
- 'urls': 'urls',
- 'release_ids': 'release_ids',
- 'releases': 'releases'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, content_scope=None, manifest=None, urls=None, release_ids=None, releases=None): # noqa: E501
- """FilesetEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._content_scope = None
- self._manifest = None
- self._urls = None
- self._release_ids = None
- self._releases = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if content_scope is not None:
- self.content_scope = content_scope
- if manifest is not None:
- self.manifest = manifest
- if urls is not None:
- self.urls = urls
- if release_ids is not None:
- self.release_ids = release_ids
- if releases is not None:
- self.releases = releases
-
- @property
- def state(self):
- """Gets the state of this FilesetEntity. # noqa: E501
-
-
- :return: The state of this FilesetEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this FilesetEntity.
-
-
- :param state: The state of this FilesetEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this FilesetEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this FilesetEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this FilesetEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this FilesetEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this FilesetEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this FilesetEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this FilesetEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this FilesetEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this FilesetEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this FilesetEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this FilesetEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this FilesetEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this FilesetEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this FilesetEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this FilesetEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this FilesetEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this FilesetEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this FilesetEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this FilesetEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this FilesetEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def content_scope(self):
- """Gets the content_scope of this FilesetEntity. # noqa: E501
-
-
- :return: The content_scope of this FilesetEntity. # noqa: E501
- :rtype: str
- """
- return self._content_scope
-
- @content_scope.setter
- def content_scope(self, content_scope):
- """Sets the content_scope of this FilesetEntity.
-
-
- :param content_scope: The content_scope of this FilesetEntity. # noqa: E501
- :type: str
- """
-
- self._content_scope = content_scope
-
- @property
- def manifest(self):
- """Gets the manifest of this FilesetEntity. # noqa: E501
-
-
- :return: The manifest of this FilesetEntity. # noqa: E501
- :rtype: list[FilesetFile]
- """
- return self._manifest
-
- @manifest.setter
- def manifest(self, manifest):
- """Sets the manifest of this FilesetEntity.
-
-
- :param manifest: The manifest of this FilesetEntity. # noqa: E501
- :type: list[FilesetFile]
- """
-
- self._manifest = manifest
-
- @property
- def urls(self):
- """Gets the urls of this FilesetEntity. # noqa: E501
-
-
- :return: The urls of this FilesetEntity. # noqa: E501
- :rtype: list[FilesetUrl]
- """
- return self._urls
-
- @urls.setter
- def urls(self, urls):
- """Sets the urls of this FilesetEntity.
-
-
- :param urls: The urls of this FilesetEntity. # noqa: E501
- :type: list[FilesetUrl]
- """
-
- self._urls = urls
-
- @property
- def release_ids(self):
- """Gets the release_ids of this FilesetEntity. # noqa: E501
-
- Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501
-
- :return: The release_ids of this FilesetEntity. # noqa: E501
- :rtype: list[str]
- """
- return self._release_ids
-
- @release_ids.setter
- def release_ids(self, release_ids):
- """Sets the release_ids of this FilesetEntity.
-
- Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501
-
- :param release_ids: The release_ids of this FilesetEntity. # noqa: E501
- :type: list[str]
- """
-
- self._release_ids = release_ids
-
- @property
- def releases(self):
- """Gets the releases of this FilesetEntity. # noqa: E501
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :return: The releases of this FilesetEntity. # noqa: E501
- :rtype: list[ReleaseEntity]
- """
- return self._releases
-
- @releases.setter
- def releases(self, releases):
- """Sets the releases of this FilesetEntity.
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :param releases: The releases of this FilesetEntity. # noqa: E501
- :type: list[ReleaseEntity]
- """
-
- self._releases = releases
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FilesetEntity):
- 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_openapi_client/fatcat_openapi_client/models/fileset_file.py b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py
deleted file mode 100644
index 0741f9a5..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py
+++ /dev/null
@@ -1,301 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.4.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FilesetFile(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'path': 'str',
- 'size': 'int',
- 'md5': 'str',
- 'sha1': 'str',
- 'sha256': 'str',
- 'mimetype': 'str',
- 'extra': 'dict(str, object)'
- }
-
- attribute_map = {
- 'path': 'path',
- 'size': 'size',
- 'md5': 'md5',
- 'sha1': 'sha1',
- 'sha256': 'sha256',
- 'mimetype': 'mimetype',
- 'extra': 'extra'
- }
-
- def __init__(self, path=None, size=None, md5=None, sha1=None, sha256=None, mimetype=None, extra=None): # noqa: E501
- """FilesetFile - a model defined in OpenAPI""" # noqa: E501
-
- self._path = None
- self._size = None
- self._md5 = None
- self._sha1 = None
- self._sha256 = None
- self._mimetype = None
- self._extra = None
- self.discriminator = None
-
- self.path = path
- self.size = size
- if md5 is not None:
- self.md5 = md5
- if sha1 is not None:
- self.sha1 = sha1
- if sha256 is not None:
- self.sha256 = sha256
- if mimetype is not None:
- self.mimetype = mimetype
- if extra is not None:
- self.extra = extra
-
- @property
- def path(self):
- """Gets the path of this FilesetFile. # noqa: E501
-
- Path name of file within this fileset (eg, directory) # noqa: E501
-
- :return: The path of this FilesetFile. # noqa: E501
- :rtype: str
- """
- return self._path
-
- @path.setter
- def path(self, path):
- """Sets the path of this FilesetFile.
-
- Path name of file within this fileset (eg, directory) # noqa: E501
-
- :param path: The path of this FilesetFile. # noqa: E501
- :type: str
- """
- if path is None:
- raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501
-
- self._path = path
-
- @property
- def size(self):
- """Gets the size of this FilesetFile. # noqa: E501
-
- File size in bytes # noqa: E501
-
- :return: The size of this FilesetFile. # noqa: E501
- :rtype: int
- """
- return self._size
-
- @size.setter
- def size(self, size):
- """Sets the size of this FilesetFile.
-
- File size in bytes # noqa: E501
-
- :param size: The size of this FilesetFile. # noqa: E501
- :type: int
- """
- if size is None:
- raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
-
- self._size = size
-
- @property
- def md5(self):
- """Gets the md5 of this FilesetFile. # noqa: E501
-
- MD5 hash of data, in hex encoding # noqa: E501
-
- :return: The md5 of this FilesetFile. # noqa: E501
- :rtype: str
- """
- return self._md5
-
- @md5.setter
- def md5(self, md5):
- """Sets the md5 of this FilesetFile.
-
- MD5 hash of data, in hex encoding # noqa: E501
-
- :param md5: The md5 of this FilesetFile. # noqa: E501
- :type: str
- """
- if md5 is not None and len(md5) > 32:
- raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501
- if md5 is not None and len(md5) < 32:
- raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501
- if md5 is not None and not re.search(r'[a-f0-9]{32}', md5): # noqa: E501
- raise ValueError(r"Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501
-
- self._md5 = md5
-
- @property
- def sha1(self):
- """Gets the sha1 of this FilesetFile. # noqa: E501
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :return: The sha1 of this FilesetFile. # noqa: E501
- :rtype: str
- """
- return self._sha1
-
- @sha1.setter
- def sha1(self, sha1):
- """Sets the sha1 of this FilesetFile.
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :param sha1: The sha1 of this FilesetFile. # noqa: E501
- :type: str
- """
- if sha1 is not None and len(sha1) > 40:
- raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501
- if sha1 is not None and len(sha1) < 40:
- raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501
- if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501
- raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501
-
- self._sha1 = sha1
-
- @property
- def sha256(self):
- """Gets the sha256 of this FilesetFile. # noqa: E501
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :return: The sha256 of this FilesetFile. # noqa: E501
- :rtype: str
- """
- return self._sha256
-
- @sha256.setter
- def sha256(self, sha256):
- """Sets the sha256 of this FilesetFile.
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :param sha256: The sha256 of this FilesetFile. # noqa: E501
- :type: str
- """
- if sha256 is not None and len(sha256) > 64:
- raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501
- if sha256 is not None and len(sha256) < 64:
- raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501
- if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501
- raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501
-
- self._sha256 = sha256
-
- @property
- def mimetype(self):
- """Gets the mimetype of this FilesetFile. # noqa: E501
-
-
- :return: The mimetype of this FilesetFile. # noqa: E501
- :rtype: str
- """
- return self._mimetype
-
- @mimetype.setter
- def mimetype(self, mimetype):
- """Sets the mimetype of this FilesetFile.
-
-
- :param mimetype: The mimetype of this FilesetFile. # noqa: E501
- :type: str
- """
-
- self._mimetype = mimetype
-
- @property
- def extra(self):
- """Gets the extra of this FilesetFile. # noqa: E501
-
- Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501
-
- :return: The extra of this FilesetFile. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this FilesetFile.
-
- Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501
-
- :param extra: The extra of this FilesetFile. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FilesetFile):
- 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_openapi_client/fatcat_openapi_client/models/fileset_url.py b/python_openapi_client/fatcat_openapi_client/models/fileset_url.py
deleted file mode 100644
index cde1119c..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/fileset_url.py
+++ /dev/null
@@ -1,143 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class FilesetUrl(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'url': 'str',
- 'rel': 'str'
- }
-
- attribute_map = {
- 'url': 'url',
- 'rel': 'rel'
- }
-
- def __init__(self, url=None, rel=None): # noqa: E501
- """FilesetUrl - a model defined in OpenAPI""" # noqa: E501
-
- self._url = None
- self._rel = None
- self.discriminator = None
-
- self.url = url
- self.rel = rel
-
- @property
- def url(self):
- """Gets the url of this FilesetUrl. # noqa: E501
-
-
- :return: The url of this FilesetUrl. # noqa: E501
- :rtype: str
- """
- return self._url
-
- @url.setter
- def url(self, url):
- """Sets the url of this FilesetUrl.
-
-
- :param url: The url of this FilesetUrl. # noqa: E501
- :type: str
- """
- if url is None:
- raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
-
- self._url = url
-
- @property
- def rel(self):
- """Gets the rel of this FilesetUrl. # noqa: E501
-
- Indicates type of host this URL points to. See guide for list of acceptable values. # noqa: E501
-
- :return: The rel of this FilesetUrl. # noqa: E501
- :rtype: str
- """
- return self._rel
-
- @rel.setter
- def rel(self, rel):
- """Sets the rel of this FilesetUrl.
-
- Indicates type of host this URL points to. See guide for list of acceptable values. # noqa: E501
-
- :param rel: The rel of this FilesetUrl. # noqa: E501
- :type: str
- """
- if rel is None:
- raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501
-
- self._rel = rel
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, FilesetUrl):
- 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_openapi_client/fatcat_openapi_client/models/release_abstract.py b/python_openapi_client/fatcat_openapi_client/models/release_abstract.py
deleted file mode 100644
index c6c7aab7..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_abstract.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseAbstract(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'sha1': 'str',
- 'content': 'str',
- 'mimetype': 'str',
- 'lang': 'str'
- }
-
- attribute_map = {
- 'sha1': 'sha1',
- 'content': 'content',
- 'mimetype': 'mimetype',
- 'lang': 'lang'
- }
-
- def __init__(self, sha1=None, content=None, mimetype=None, lang=None): # noqa: E501
- """ReleaseAbstract - a model defined in OpenAPI""" # noqa: E501
-
- self._sha1 = None
- self._content = None
- self._mimetype = None
- self._lang = None
- self.discriminator = None
-
- if sha1 is not None:
- self.sha1 = sha1
- if content is not None:
- self.content = content
- if mimetype is not None:
- self.mimetype = mimetype
- if lang is not None:
- self.lang = lang
-
- @property
- def sha1(self):
- """Gets the sha1 of this ReleaseAbstract. # noqa: E501
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :return: The sha1 of this ReleaseAbstract. # noqa: E501
- :rtype: str
- """
- return self._sha1
-
- @sha1.setter
- def sha1(self, sha1):
- """Sets the sha1 of this ReleaseAbstract.
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :param sha1: The sha1 of this ReleaseAbstract. # noqa: E501
- :type: str
- """
- if sha1 is not None and len(sha1) > 40:
- raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501
- if sha1 is not None and len(sha1) < 40:
- raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501
- if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501
- raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501
-
- self._sha1 = sha1
-
- @property
- def content(self):
- """Gets the content of this ReleaseAbstract. # noqa: E501
-
- Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. # noqa: E501
-
- :return: The content of this ReleaseAbstract. # noqa: E501
- :rtype: str
- """
- return self._content
-
- @content.setter
- def content(self, content):
- """Sets the content of this ReleaseAbstract.
-
- Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. # noqa: E501
-
- :param content: The content of this ReleaseAbstract. # noqa: E501
- :type: str
- """
-
- self._content = content
-
- @property
- def mimetype(self):
- """Gets the mimetype of this ReleaseAbstract. # noqa: E501
-
- Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. # noqa: E501
-
- :return: The mimetype of this ReleaseAbstract. # noqa: E501
- :rtype: str
- """
- return self._mimetype
-
- @mimetype.setter
- def mimetype(self, mimetype):
- """Sets the mimetype of this ReleaseAbstract.
-
- Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. # noqa: E501
-
- :param mimetype: The mimetype of this ReleaseAbstract. # noqa: E501
- :type: str
- """
-
- self._mimetype = mimetype
-
- @property
- def lang(self):
- """Gets the lang of this ReleaseAbstract. # noqa: E501
-
- ISO language code of the abstract. Same semantics as release `language` field. # noqa: E501
-
- :return: The lang of this ReleaseAbstract. # noqa: E501
- :rtype: str
- """
- return self._lang
-
- @lang.setter
- def lang(self, lang):
- """Sets the lang of this ReleaseAbstract.
-
- ISO language code of the abstract. Same semantics as release `language` field. # noqa: E501
-
- :param lang: The lang of this ReleaseAbstract. # noqa: E501
- :type: str
- """
-
- self._lang = lang
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseAbstract):
- 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_openapi_client/fatcat_openapi_client/models/release_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py
deleted file mode 100644
index 9d1f6bbc..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[ReleaseEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """ReleaseAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this ReleaseAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this ReleaseAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this ReleaseAutoBatch.
-
-
- :param editgroup: The editgroup of this ReleaseAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this ReleaseAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this ReleaseAutoBatch. # noqa: E501
- :rtype: list[ReleaseEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this ReleaseAutoBatch.
-
-
- :param entity_list: The entity_list of this ReleaseAutoBatch. # noqa: E501
- :type: list[ReleaseEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/release_contrib.py b/python_openapi_client/fatcat_openapi_client/models/release_contrib.py
deleted file mode 100644
index f2de29df..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_contrib.py
+++ /dev/null
@@ -1,343 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseContrib(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'index': 'int',
- 'creator_id': 'str',
- 'creator': 'CreatorEntity',
- 'raw_name': 'str',
- 'given_name': 'str',
- 'surname': 'str',
- 'role': 'str',
- 'raw_affiliation': 'str',
- 'extra': 'dict(str, object)'
- }
-
- attribute_map = {
- 'index': 'index',
- 'creator_id': 'creator_id',
- 'creator': 'creator',
- 'raw_name': 'raw_name',
- 'given_name': 'given_name',
- 'surname': 'surname',
- 'role': 'role',
- 'raw_affiliation': 'raw_affiliation',
- 'extra': 'extra'
- }
-
- def __init__(self, index=None, creator_id=None, creator=None, raw_name=None, given_name=None, surname=None, role=None, raw_affiliation=None, extra=None): # noqa: E501
- """ReleaseContrib - a model defined in OpenAPI""" # noqa: E501
-
- self._index = None
- self._creator_id = None
- self._creator = None
- self._raw_name = None
- self._given_name = None
- self._surname = None
- self._role = None
- self._raw_affiliation = None
- self._extra = None
- self.discriminator = None
-
- if index is not None:
- self.index = index
- if creator_id is not None:
- self.creator_id = creator_id
- if creator is not None:
- self.creator = creator
- if raw_name is not None:
- self.raw_name = raw_name
- if given_name is not None:
- self.given_name = given_name
- if surname is not None:
- self.surname = surname
- if role is not None:
- self.role = role
- if raw_affiliation is not None:
- self.raw_affiliation = raw_affiliation
- if extra is not None:
- self.extra = extra
-
- @property
- def index(self):
- """Gets the index of this ReleaseContrib. # noqa: E501
-
- Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. # noqa: E501
-
- :return: The index of this ReleaseContrib. # noqa: E501
- :rtype: int
- """
- return self._index
-
- @index.setter
- def index(self, index):
- """Sets the index of this ReleaseContrib.
-
- Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. # noqa: E501
-
- :param index: The index of this ReleaseContrib. # noqa: E501
- :type: int
- """
-
- self._index = index
-
- @property
- def creator_id(self):
- """Gets the creator_id of this ReleaseContrib. # noqa: E501
-
- If known, indicates the creator entity this contribution was made by. # noqa: E501
-
- :return: The creator_id of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._creator_id
-
- @creator_id.setter
- def creator_id(self, creator_id):
- """Sets the creator_id of this ReleaseContrib.
-
- If known, indicates the creator entity this contribution was made by. # noqa: E501
-
- :param creator_id: The creator_id of this ReleaseContrib. # noqa: E501
- :type: str
- """
- if creator_id is not None and len(creator_id) > 26:
- raise ValueError("Invalid value for `creator_id`, length must be less than or equal to `26`") # noqa: E501
- if creator_id is not None and len(creator_id) < 26:
- raise ValueError("Invalid value for `creator_id`, length must be greater than or equal to `26`") # noqa: E501
- if creator_id is not None and not re.search(r'[a-zA-Z2-7]{26}', creator_id): # noqa: E501
- raise ValueError(r"Invalid value for `creator_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._creator_id = creator_id
-
- @property
- def creator(self):
- """Gets the creator of this ReleaseContrib. # noqa: E501
-
-
- :return: The creator of this ReleaseContrib. # noqa: E501
- :rtype: CreatorEntity
- """
- return self._creator
-
- @creator.setter
- def creator(self, creator):
- """Sets the creator of this ReleaseContrib.
-
-
- :param creator: The creator of this ReleaseContrib. # noqa: E501
- :type: CreatorEntity
- """
-
- self._creator = creator
-
- @property
- def raw_name(self):
- """Gets the raw_name of this ReleaseContrib. # noqa: E501
-
- Full name of the contributor as typeset in the release. # noqa: E501
-
- :return: The raw_name of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._raw_name
-
- @raw_name.setter
- def raw_name(self, raw_name):
- """Sets the raw_name of this ReleaseContrib.
-
- Full name of the contributor as typeset in the release. # noqa: E501
-
- :param raw_name: The raw_name of this ReleaseContrib. # noqa: E501
- :type: str
- """
-
- self._raw_name = raw_name
-
- @property
- def given_name(self):
- """Gets the given_name of this ReleaseContrib. # noqa: E501
-
- In English commonly the first name, but ordering is context and culture specific. # noqa: E501
-
- :return: The given_name of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._given_name
-
- @given_name.setter
- def given_name(self, given_name):
- """Sets the given_name of this ReleaseContrib.
-
- In English commonly the first name, but ordering is context and culture specific. # noqa: E501
-
- :param given_name: The given_name of this ReleaseContrib. # noqa: E501
- :type: str
- """
-
- self._given_name = given_name
-
- @property
- def surname(self):
- """Gets the surname of this ReleaseContrib. # noqa: E501
-
- In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501
-
- :return: The surname of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._surname
-
- @surname.setter
- def surname(self, surname):
- """Sets the surname of this ReleaseContrib.
-
- In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501
-
- :param surname: The surname of this ReleaseContrib. # noqa: E501
- :type: str
- """
-
- self._surname = surname
-
- @property
- def role(self):
- """Gets the role of this ReleaseContrib. # noqa: E501
-
- Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. # noqa: E501
-
- :return: The role of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._role
-
- @role.setter
- def role(self, role):
- """Sets the role of this ReleaseContrib.
-
- Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. # noqa: E501
-
- :param role: The role of this ReleaseContrib. # noqa: E501
- :type: str
- """
-
- self._role = role
-
- @property
- def raw_affiliation(self):
- """Gets the raw_affiliation of this ReleaseContrib. # noqa: E501
-
- Raw affiliation string as displayed in text # noqa: E501
-
- :return: The raw_affiliation of this ReleaseContrib. # noqa: E501
- :rtype: str
- """
- return self._raw_affiliation
-
- @raw_affiliation.setter
- def raw_affiliation(self, raw_affiliation):
- """Sets the raw_affiliation of this ReleaseContrib.
-
- Raw affiliation string as displayed in text # noqa: E501
-
- :param raw_affiliation: The raw_affiliation of this ReleaseContrib. # noqa: E501
- :type: str
- """
-
- self._raw_affiliation = raw_affiliation
-
- @property
- def extra(self):
- """Gets the extra of this ReleaseContrib. # noqa: E501
-
- Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. # noqa: E501
-
- :return: The extra of this ReleaseContrib. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this ReleaseContrib.
-
- Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. # noqa: E501
-
- :param extra: The extra of this ReleaseContrib. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseContrib):
- 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_openapi_client/fatcat_openapi_client/models/release_entity.py b/python_openapi_client/fatcat_openapi_client/models/release_entity.py
deleted file mode 100644
index a88124d4..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_entity.py
+++ /dev/null
@@ -1,1052 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'title': 'str',
- 'subtitle': 'str',
- 'original_title': 'str',
- 'work_id': 'str',
- 'container': 'ContainerEntity',
- 'files': 'list[FileEntity]',
- 'filesets': 'list[FilesetEntity]',
- 'webcaptures': 'list[WebcaptureEntity]',
- 'container_id': 'str',
- 'release_type': 'str',
- 'release_stage': 'str',
- 'release_date': 'date',
- 'release_year': 'int',
- 'withdrawn_status': 'str',
- 'withdrawn_date': 'date',
- 'withdrawn_year': 'int',
- 'ext_ids': 'ReleaseExtIds',
- 'volume': 'str',
- 'issue': 'str',
- 'pages': 'str',
- 'number': 'str',
- 'version': 'str',
- 'publisher': 'str',
- 'language': 'str',
- 'license_slug': 'str',
- 'contribs': 'list[ReleaseContrib]',
- 'refs': 'list[ReleaseRef]',
- 'abstracts': 'list[ReleaseAbstract]'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'title': 'title',
- 'subtitle': 'subtitle',
- 'original_title': 'original_title',
- 'work_id': 'work_id',
- 'container': 'container',
- 'files': 'files',
- 'filesets': 'filesets',
- 'webcaptures': 'webcaptures',
- 'container_id': 'container_id',
- 'release_type': 'release_type',
- 'release_stage': 'release_stage',
- 'release_date': 'release_date',
- 'release_year': 'release_year',
- 'withdrawn_status': 'withdrawn_status',
- 'withdrawn_date': 'withdrawn_date',
- 'withdrawn_year': 'withdrawn_year',
- 'ext_ids': 'ext_ids',
- 'volume': 'volume',
- 'issue': 'issue',
- 'pages': 'pages',
- 'number': 'number',
- 'version': 'version',
- 'publisher': 'publisher',
- 'language': 'language',
- 'license_slug': 'license_slug',
- 'contribs': 'contribs',
- 'refs': 'refs',
- 'abstracts': 'abstracts'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, title=None, subtitle=None, original_title=None, work_id=None, container=None, files=None, filesets=None, webcaptures=None, container_id=None, release_type=None, release_stage=None, release_date=None, release_year=None, withdrawn_status=None, withdrawn_date=None, withdrawn_year=None, ext_ids=None, volume=None, issue=None, pages=None, number=None, version=None, publisher=None, language=None, license_slug=None, contribs=None, refs=None, abstracts=None): # noqa: E501
- """ReleaseEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._title = None
- self._subtitle = None
- self._original_title = None
- self._work_id = None
- self._container = None
- self._files = None
- self._filesets = None
- self._webcaptures = None
- self._container_id = None
- self._release_type = None
- self._release_stage = None
- self._release_date = None
- self._release_year = None
- self._withdrawn_status = None
- self._withdrawn_date = None
- self._withdrawn_year = None
- self._ext_ids = None
- self._volume = None
- self._issue = None
- self._pages = None
- self._number = None
- self._version = None
- self._publisher = None
- self._language = None
- self._license_slug = None
- self._contribs = None
- self._refs = None
- self._abstracts = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if title is not None:
- self.title = title
- if subtitle is not None:
- self.subtitle = subtitle
- if original_title is not None:
- self.original_title = original_title
- if work_id is not None:
- self.work_id = work_id
- if container is not None:
- self.container = container
- if files is not None:
- self.files = files
- if filesets is not None:
- self.filesets = filesets
- if webcaptures is not None:
- self.webcaptures = webcaptures
- if container_id is not None:
- self.container_id = container_id
- if release_type is not None:
- self.release_type = release_type
- if release_stage is not None:
- self.release_stage = release_stage
- if release_date is not None:
- self.release_date = release_date
- if release_year is not None:
- self.release_year = release_year
- if withdrawn_status is not None:
- self.withdrawn_status = withdrawn_status
- if withdrawn_date is not None:
- self.withdrawn_date = withdrawn_date
- if withdrawn_year is not None:
- self.withdrawn_year = withdrawn_year
- self.ext_ids = ext_ids
- if volume is not None:
- self.volume = volume
- if issue is not None:
- self.issue = issue
- if pages is not None:
- self.pages = pages
- if number is not None:
- self.number = number
- if version is not None:
- self.version = version
- if publisher is not None:
- self.publisher = publisher
- if language is not None:
- self.language = language
- if license_slug is not None:
- self.license_slug = license_slug
- if contribs is not None:
- self.contribs = contribs
- if refs is not None:
- self.refs = refs
- if abstracts is not None:
- self.abstracts = abstracts
-
- @property
- def state(self):
- """Gets the state of this ReleaseEntity. # noqa: E501
-
-
- :return: The state of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this ReleaseEntity.
-
-
- :param state: The state of this ReleaseEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this ReleaseEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this ReleaseEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this ReleaseEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this ReleaseEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this ReleaseEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this ReleaseEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this ReleaseEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this ReleaseEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this ReleaseEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this ReleaseEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this ReleaseEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this ReleaseEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this ReleaseEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this ReleaseEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this ReleaseEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this ReleaseEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this ReleaseEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def title(self):
- """Gets the title of this ReleaseEntity. # noqa: E501
-
- Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. # noqa: E501
-
- :return: The title of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._title
-
- @title.setter
- def title(self, title):
- """Sets the title of this ReleaseEntity.
-
- Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. # noqa: E501
-
- :param title: The title of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._title = title
-
- @property
- def subtitle(self):
- """Gets the subtitle of this ReleaseEntity. # noqa: E501
-
- Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. # noqa: E501
-
- :return: The subtitle of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._subtitle
-
- @subtitle.setter
- def subtitle(self, subtitle):
- """Sets the subtitle of this ReleaseEntity.
-
- Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. # noqa: E501
-
- :param subtitle: The subtitle of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._subtitle = subtitle
-
- @property
- def original_title(self):
- """Gets the original_title of this ReleaseEntity. # noqa: E501
-
- Title in original language if `title` field has been translated. See guide for details. # noqa: E501
-
- :return: The original_title of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._original_title
-
- @original_title.setter
- def original_title(self, original_title):
- """Sets the original_title of this ReleaseEntity.
-
- Title in original language if `title` field has been translated. See guide for details. # noqa: E501
-
- :param original_title: The original_title of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._original_title = original_title
-
- @property
- def work_id(self):
- """Gets the work_id of this ReleaseEntity. # noqa: E501
-
- Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. # noqa: E501
-
- :return: The work_id of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._work_id
-
- @work_id.setter
- def work_id(self, work_id):
- """Sets the work_id of this ReleaseEntity.
-
- Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. # noqa: E501
-
- :param work_id: The work_id of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._work_id = work_id
-
- @property
- def container(self):
- """Gets the container of this ReleaseEntity. # noqa: E501
-
-
- :return: The container of this ReleaseEntity. # noqa: E501
- :rtype: ContainerEntity
- """
- return self._container
-
- @container.setter
- def container(self, container):
- """Sets the container of this ReleaseEntity.
-
-
- :param container: The container of this ReleaseEntity. # noqa: E501
- :type: ContainerEntity
- """
-
- self._container = container
-
- @property
- def files(self):
- """Gets the files of this ReleaseEntity. # noqa: E501
-
- Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :return: The files of this ReleaseEntity. # noqa: E501
- :rtype: list[FileEntity]
- """
- return self._files
-
- @files.setter
- def files(self, files):
- """Sets the files of this ReleaseEntity.
-
- Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :param files: The files of this ReleaseEntity. # noqa: E501
- :type: list[FileEntity]
- """
-
- self._files = files
-
- @property
- def filesets(self):
- """Gets the filesets of this ReleaseEntity. # noqa: E501
-
- Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :return: The filesets of this ReleaseEntity. # noqa: E501
- :rtype: list[FilesetEntity]
- """
- return self._filesets
-
- @filesets.setter
- def filesets(self, filesets):
- """Sets the filesets of this ReleaseEntity.
-
- Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :param filesets: The filesets of this ReleaseEntity. # noqa: E501
- :type: list[FilesetEntity]
- """
-
- self._filesets = filesets
-
- @property
- def webcaptures(self):
- """Gets the webcaptures of this ReleaseEntity. # noqa: E501
-
- Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :return: The webcaptures of this ReleaseEntity. # noqa: E501
- :rtype: list[WebcaptureEntity]
- """
- return self._webcaptures
-
- @webcaptures.setter
- def webcaptures(self, webcaptures):
- """Sets the webcaptures of this ReleaseEntity.
-
- Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501
-
- :param webcaptures: The webcaptures of this ReleaseEntity. # noqa: E501
- :type: list[WebcaptureEntity]
- """
-
- self._webcaptures = webcaptures
-
- @property
- def container_id(self):
- """Gets the container_id of this ReleaseEntity. # noqa: E501
-
- Used to link this release to a container entity that the release was published as part of. # noqa: E501
-
- :return: The container_id of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._container_id
-
- @container_id.setter
- def container_id(self, container_id):
- """Sets the container_id of this ReleaseEntity.
-
- Used to link this release to a container entity that the release was published as part of. # noqa: E501
-
- :param container_id: The container_id of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._container_id = container_id
-
- @property
- def release_type(self):
- """Gets the release_type of this ReleaseEntity. # noqa: E501
-
- \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501
-
- :return: The release_type of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._release_type
-
- @release_type.setter
- def release_type(self, release_type):
- """Sets the release_type of this ReleaseEntity.
-
- \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501
-
- :param release_type: The release_type of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._release_type = release_type
-
- @property
- def release_stage(self):
- """Gets the release_stage of this ReleaseEntity. # noqa: E501
-
- The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501
-
- :return: The release_stage of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._release_stage
-
- @release_stage.setter
- def release_stage(self, release_stage):
- """Sets the release_stage of this ReleaseEntity.
-
- The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501
-
- :param release_stage: The release_stage of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._release_stage = release_stage
-
- @property
- def release_date(self):
- """Gets the release_date of this ReleaseEntity. # noqa: E501
-
- Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. # noqa: E501
-
- :return: The release_date of this ReleaseEntity. # noqa: E501
- :rtype: date
- """
- return self._release_date
-
- @release_date.setter
- def release_date(self, release_date):
- """Sets the release_date of this ReleaseEntity.
-
- Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. # noqa: E501
-
- :param release_date: The release_date of this ReleaseEntity. # noqa: E501
- :type: date
- """
-
- self._release_date = release_date
-
- @property
- def release_year(self):
- """Gets the release_year of this ReleaseEntity. # noqa: E501
-
- Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. # noqa: E501
-
- :return: The release_year of this ReleaseEntity. # noqa: E501
- :rtype: int
- """
- return self._release_year
-
- @release_year.setter
- def release_year(self, release_year):
- """Sets the release_year of this ReleaseEntity.
-
- Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. # noqa: E501
-
- :param release_year: The release_year of this ReleaseEntity. # noqa: E501
- :type: int
- """
-
- self._release_year = release_year
-
- @property
- def withdrawn_status(self):
- """Gets the withdrawn_status of this ReleaseEntity. # noqa: E501
-
- Type of withdrawl or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). # noqa: E501
-
- :return: The withdrawn_status of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._withdrawn_status
-
- @withdrawn_status.setter
- def withdrawn_status(self, withdrawn_status):
- """Sets the withdrawn_status of this ReleaseEntity.
-
- Type of withdrawl or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). # noqa: E501
-
- :param withdrawn_status: The withdrawn_status of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._withdrawn_status = withdrawn_status
-
- @property
- def withdrawn_date(self):
- """Gets the withdrawn_date of this ReleaseEntity. # noqa: E501
-
- Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501
-
- :return: The withdrawn_date of this ReleaseEntity. # noqa: E501
- :rtype: date
- """
- return self._withdrawn_date
-
- @withdrawn_date.setter
- def withdrawn_date(self, withdrawn_date):
- """Sets the withdrawn_date of this ReleaseEntity.
-
- Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501
-
- :param withdrawn_date: The withdrawn_date of this ReleaseEntity. # noqa: E501
- :type: date
- """
-
- self._withdrawn_date = withdrawn_date
-
- @property
- def withdrawn_year(self):
- """Gets the withdrawn_year of this ReleaseEntity. # noqa: E501
-
- Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501
-
- :return: The withdrawn_year of this ReleaseEntity. # noqa: E501
- :rtype: int
- """
- return self._withdrawn_year
-
- @withdrawn_year.setter
- def withdrawn_year(self, withdrawn_year):
- """Sets the withdrawn_year of this ReleaseEntity.
-
- Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501
-
- :param withdrawn_year: The withdrawn_year of this ReleaseEntity. # noqa: E501
- :type: int
- """
-
- self._withdrawn_year = withdrawn_year
-
- @property
- def ext_ids(self):
- """Gets the ext_ids of this ReleaseEntity. # noqa: E501
-
-
- :return: The ext_ids of this ReleaseEntity. # noqa: E501
- :rtype: ReleaseExtIds
- """
- return self._ext_ids
-
- @ext_ids.setter
- def ext_ids(self, ext_ids):
- """Sets the ext_ids of this ReleaseEntity.
-
-
- :param ext_ids: The ext_ids of this ReleaseEntity. # noqa: E501
- :type: ReleaseExtIds
- """
- if ext_ids is None:
- raise ValueError("Invalid value for `ext_ids`, must not be `None`") # noqa: E501
-
- self._ext_ids = ext_ids
-
- @property
- def volume(self):
- """Gets the volume of this ReleaseEntity. # noqa: E501
-
- Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. # noqa: E501
-
- :return: The volume of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._volume
-
- @volume.setter
- def volume(self, volume):
- """Sets the volume of this ReleaseEntity.
-
- Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. # noqa: E501
-
- :param volume: The volume of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._volume = volume
-
- @property
- def issue(self):
- """Gets the issue of this ReleaseEntity. # noqa: E501
-
- Issue number of volume/container that this release was published in. Sometimes coresponds to a month number in the year, but can be any string. See guide. # noqa: E501
-
- :return: The issue of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._issue
-
- @issue.setter
- def issue(self, issue):
- """Sets the issue of this ReleaseEntity.
-
- Issue number of volume/container that this release was published in. Sometimes coresponds to a month number in the year, but can be any string. See guide. # noqa: E501
-
- :param issue: The issue of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._issue = issue
-
- @property
- def pages(self):
- """Gets the pages of this ReleaseEntity. # noqa: E501
-
- Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. # noqa: E501
-
- :return: The pages of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._pages
-
- @pages.setter
- def pages(self, pages):
- """Sets the pages of this ReleaseEntity.
-
- Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. # noqa: E501
-
- :param pages: The pages of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._pages = pages
-
- @property
- def number(self):
- """Gets the number of this ReleaseEntity. # noqa: E501
-
- For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501
-
- :return: The number of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._number
-
- @number.setter
- def number(self, number):
- """Sets the number of this ReleaseEntity.
-
- For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501
-
- :param number: The number of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._number = number
-
- @property
- def version(self):
- """Gets the version of this ReleaseEntity. # noqa: E501
-
- For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501
-
- :return: The version of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._version
-
- @version.setter
- def version(self, version):
- """Sets the version of this ReleaseEntity.
-
- For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501
-
- :param version: The version of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._version = version
-
- @property
- def publisher(self):
- """Gets the publisher of this ReleaseEntity. # noqa: E501
-
- Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. # noqa: E501
-
- :return: The publisher of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._publisher
-
- @publisher.setter
- def publisher(self, publisher):
- """Sets the publisher of this ReleaseEntity.
-
- Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. # noqa: E501
-
- :param publisher: The publisher of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._publisher = publisher
-
- @property
- def language(self):
- """Gets the language of this ReleaseEntity. # noqa: E501
-
- Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. # noqa: E501
-
- :return: The language of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._language
-
- @language.setter
- def language(self, language):
- """Sets the language of this ReleaseEntity.
-
- Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. # noqa: E501
-
- :param language: The language of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._language = language
-
- @property
- def license_slug(self):
- """Gets the license_slug of this ReleaseEntity. # noqa: E501
-
- Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501
-
- :return: The license_slug of this ReleaseEntity. # noqa: E501
- :rtype: str
- """
- return self._license_slug
-
- @license_slug.setter
- def license_slug(self, license_slug):
- """Sets the license_slug of this ReleaseEntity.
-
- Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501
-
- :param license_slug: The license_slug of this ReleaseEntity. # noqa: E501
- :type: str
- """
-
- self._license_slug = license_slug
-
- @property
- def contribs(self):
- """Gets the contribs of this ReleaseEntity. # noqa: E501
-
-
- :return: The contribs of this ReleaseEntity. # noqa: E501
- :rtype: list[ReleaseContrib]
- """
- return self._contribs
-
- @contribs.setter
- def contribs(self, contribs):
- """Sets the contribs of this ReleaseEntity.
-
-
- :param contribs: The contribs of this ReleaseEntity. # noqa: E501
- :type: list[ReleaseContrib]
- """
-
- self._contribs = contribs
-
- @property
- def refs(self):
- """Gets the refs of this ReleaseEntity. # noqa: E501
-
-
- :return: The refs of this ReleaseEntity. # noqa: E501
- :rtype: list[ReleaseRef]
- """
- return self._refs
-
- @refs.setter
- def refs(self, refs):
- """Sets the refs of this ReleaseEntity.
-
-
- :param refs: The refs of this ReleaseEntity. # noqa: E501
- :type: list[ReleaseRef]
- """
-
- self._refs = refs
-
- @property
- def abstracts(self):
- """Gets the abstracts of this ReleaseEntity. # noqa: E501
-
-
- :return: The abstracts of this ReleaseEntity. # noqa: E501
- :rtype: list[ReleaseAbstract]
- """
- return self._abstracts
-
- @abstracts.setter
- def abstracts(self, abstracts):
- """Sets the abstracts of this ReleaseEntity.
-
-
- :param abstracts: The abstracts of this ReleaseEntity. # noqa: E501
- :type: list[ReleaseAbstract]
- """
-
- self._abstracts = abstracts
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseEntity):
- 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_openapi_client/fatcat_openapi_client/models/release_ext_ids.py b/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py
deleted file mode 100644
index 2f46a3b8..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py
+++ /dev/null
@@ -1,479 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.4.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseExtIds(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'doi': 'str',
- 'wikidata_qid': 'str',
- 'isbn13': 'str',
- 'pmid': 'str',
- 'pmcid': 'str',
- 'core': 'str',
- 'arxiv': 'str',
- 'jstor': 'str',
- 'ark': 'str',
- 'mag': 'str',
- 'doaj': 'str',
- 'dblp': 'str',
- 'oai': 'str',
- 'hdl': 'str'
- }
-
- attribute_map = {
- 'doi': 'doi',
- 'wikidata_qid': 'wikidata_qid',
- 'isbn13': 'isbn13',
- 'pmid': 'pmid',
- 'pmcid': 'pmcid',
- 'core': 'core',
- 'arxiv': 'arxiv',
- 'jstor': 'jstor',
- 'ark': 'ark',
- 'mag': 'mag',
- 'doaj': 'doaj',
- 'dblp': 'dblp',
- 'oai': 'oai',
- 'hdl': 'hdl'
- }
-
- def __init__(self, doi=None, wikidata_qid=None, isbn13=None, pmid=None, pmcid=None, core=None, arxiv=None, jstor=None, ark=None, mag=None, doaj=None, dblp=None, oai=None, hdl=None): # noqa: E501
- """ReleaseExtIds - a model defined in OpenAPI""" # noqa: E501
-
- self._doi = None
- self._wikidata_qid = None
- self._isbn13 = None
- self._pmid = None
- self._pmcid = None
- self._core = None
- self._arxiv = None
- self._jstor = None
- self._ark = None
- self._mag = None
- self._doaj = None
- self._dblp = None
- self._oai = None
- self._hdl = None
- self.discriminator = None
-
- if doi is not None:
- self.doi = doi
- if wikidata_qid is not None:
- self.wikidata_qid = wikidata_qid
- if isbn13 is not None:
- self.isbn13 = isbn13
- if pmid is not None:
- self.pmid = pmid
- if pmcid is not None:
- self.pmcid = pmcid
- if core is not None:
- self.core = core
- if arxiv is not None:
- self.arxiv = arxiv
- if jstor is not None:
- self.jstor = jstor
- if ark is not None:
- self.ark = ark
- if mag is not None:
- self.mag = mag
- if doaj is not None:
- self.doaj = doaj
- if dblp is not None:
- self.dblp = dblp
- if oai is not None:
- self.oai = oai
- if hdl is not None:
- self.hdl = hdl
-
- @property
- def doi(self):
- """Gets the doi of this ReleaseExtIds. # noqa: E501
-
- Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ # noqa: E501
-
- :return: The doi of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._doi
-
- @doi.setter
- def doi(self, doi):
- """Sets the doi of this ReleaseExtIds.
-
- Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ # noqa: E501
-
- :param doi: The doi of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._doi = doi
-
- @property
- def wikidata_qid(self):
- """Gets the wikidata_qid of this ReleaseExtIds. # noqa: E501
-
- Wikidata entity QID # noqa: E501
-
- :return: The wikidata_qid of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._wikidata_qid
-
- @wikidata_qid.setter
- def wikidata_qid(self, wikidata_qid):
- """Sets the wikidata_qid of this ReleaseExtIds.
-
- Wikidata entity QID # noqa: E501
-
- :param wikidata_qid: The wikidata_qid of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._wikidata_qid = wikidata_qid
-
- @property
- def isbn13(self):
- """Gets the isbn13 of this ReleaseExtIds. # noqa: E501
-
- ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. # noqa: E501
-
- :return: The isbn13 of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._isbn13
-
- @isbn13.setter
- def isbn13(self, isbn13):
- """Sets the isbn13 of this ReleaseExtIds.
-
- ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. # noqa: E501
-
- :param isbn13: The isbn13 of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._isbn13 = isbn13
-
- @property
- def pmid(self):
- """Gets the pmid of this ReleaseExtIds. # noqa: E501
-
- PubMed Identifier # noqa: E501
-
- :return: The pmid of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._pmid
-
- @pmid.setter
- def pmid(self, pmid):
- """Sets the pmid of this ReleaseExtIds.
-
- PubMed Identifier # noqa: E501
-
- :param pmid: The pmid of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._pmid = pmid
-
- @property
- def pmcid(self):
- """Gets the pmcid of this ReleaseExtIds. # noqa: E501
-
- PubMed Central Identifier # noqa: E501
-
- :return: The pmcid of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._pmcid
-
- @pmcid.setter
- def pmcid(self, pmcid):
- """Sets the pmcid of this ReleaseExtIds.
-
- PubMed Central Identifier # noqa: E501
-
- :param pmcid: The pmcid of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._pmcid = pmcid
-
- @property
- def core(self):
- """Gets the core of this ReleaseExtIds. # noqa: E501
-
- CORE (https://core.ac.uk) identifier # noqa: E501
-
- :return: The core of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._core
-
- @core.setter
- def core(self, core):
- """Sets the core of this ReleaseExtIds.
-
- CORE (https://core.ac.uk) identifier # noqa: E501
-
- :param core: The core of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._core = core
-
- @property
- def arxiv(self):
- """Gets the arxiv of this ReleaseExtIds. # noqa: E501
-
- arXiv (https://arxiv.org) identifier; must include version # noqa: E501
-
- :return: The arxiv of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._arxiv
-
- @arxiv.setter
- def arxiv(self, arxiv):
- """Sets the arxiv of this ReleaseExtIds.
-
- arXiv (https://arxiv.org) identifier; must include version # noqa: E501
-
- :param arxiv: The arxiv of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._arxiv = arxiv
-
- @property
- def jstor(self):
- """Gets the jstor of this ReleaseExtIds. # noqa: E501
-
- JSTOR work identifier # noqa: E501
-
- :return: The jstor of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._jstor
-
- @jstor.setter
- def jstor(self, jstor):
- """Sets the jstor of this ReleaseExtIds.
-
- JSTOR work identifier # noqa: E501
-
- :param jstor: The jstor of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._jstor = jstor
-
- @property
- def ark(self):
- """Gets the ark of this ReleaseExtIds. # noqa: E501
-
- ARK identifier # noqa: E501
-
- :return: The ark of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._ark
-
- @ark.setter
- def ark(self, ark):
- """Sets the ark of this ReleaseExtIds.
-
- ARK identifier # noqa: E501
-
- :param ark: The ark of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._ark = ark
-
- @property
- def mag(self):
- """Gets the mag of this ReleaseExtIds. # noqa: E501
-
- Microsoft Academic Graph identifier # noqa: E501
-
- :return: The mag of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._mag
-
- @mag.setter
- def mag(self, mag):
- """Sets the mag of this ReleaseExtIds.
-
- Microsoft Academic Graph identifier # noqa: E501
-
- :param mag: The mag of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._mag = mag
-
- @property
- def doaj(self):
- """Gets the doaj of this ReleaseExtIds. # noqa: E501
-
- DOAJ article-level identifier # noqa: E501
-
- :return: The doaj of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._doaj
-
- @doaj.setter
- def doaj(self, doaj):
- """Sets the doaj of this ReleaseExtIds.
-
- DOAJ article-level identifier # noqa: E501
-
- :param doaj: The doaj of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._doaj = doaj
-
- @property
- def dblp(self):
- """Gets the dblp of this ReleaseExtIds. # noqa: E501
-
- dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings # noqa: E501
-
- :return: The dblp of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._dblp
-
- @dblp.setter
- def dblp(self, dblp):
- """Sets the dblp of this ReleaseExtIds.
-
- dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings # noqa: E501
-
- :param dblp: The dblp of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._dblp = dblp
-
- @property
- def oai(self):
- """Gets the oai of this ReleaseExtIds. # noqa: E501
-
- OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs) # noqa: E501
-
- :return: The oai of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._oai
-
- @oai.setter
- def oai(self, oai):
- """Sets the oai of this ReleaseExtIds.
-
- OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs) # noqa: E501
-
- :param oai: The oai of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._oai = oai
-
- @property
- def hdl(self):
- """Gets the hdl of this ReleaseExtIds. # noqa: E501
-
- Handle identifier. Do not put DOIs in this field # noqa: E501
-
- :return: The hdl of this ReleaseExtIds. # noqa: E501
- :rtype: str
- """
- return self._hdl
-
- @hdl.setter
- def hdl(self, hdl):
- """Sets the hdl of this ReleaseExtIds.
-
- Handle identifier. Do not put DOIs in this field # noqa: E501
-
- :param hdl: The hdl of this ReleaseExtIds. # noqa: E501
- :type: str
- """
-
- self._hdl = hdl
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseExtIds):
- 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_openapi_client/fatcat_openapi_client/models/release_ref.py b/python_openapi_client/fatcat_openapi_client/models/release_ref.py
deleted file mode 100644
index 1fd5288d..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/release_ref.py
+++ /dev/null
@@ -1,317 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class ReleaseRef(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'index': 'int',
- 'target_release_id': 'str',
- 'extra': 'dict(str, object)',
- 'key': 'str',
- 'year': 'int',
- 'container_name': 'str',
- 'title': 'str',
- 'locator': 'str'
- }
-
- attribute_map = {
- 'index': 'index',
- 'target_release_id': 'target_release_id',
- 'extra': 'extra',
- 'key': 'key',
- 'year': 'year',
- 'container_name': 'container_name',
- 'title': 'title',
- 'locator': 'locator'
- }
-
- def __init__(self, index=None, target_release_id=None, extra=None, key=None, year=None, container_name=None, title=None, locator=None): # noqa: E501
- """ReleaseRef - a model defined in OpenAPI""" # noqa: E501
-
- self._index = None
- self._target_release_id = None
- self._extra = None
- self._key = None
- self._year = None
- self._container_name = None
- self._title = None
- self._locator = None
- self.discriminator = None
-
- if index is not None:
- self.index = index
- if target_release_id is not None:
- self.target_release_id = target_release_id
- if extra is not None:
- self.extra = extra
- if key is not None:
- self.key = key
- if year is not None:
- self.year = year
- if container_name is not None:
- self.container_name = container_name
- if title is not None:
- self.title = title
- if locator is not None:
- self.locator = locator
-
- @property
- def index(self):
- """Gets the index of this ReleaseRef. # noqa: E501
-
- Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. # noqa: E501
-
- :return: The index of this ReleaseRef. # noqa: E501
- :rtype: int
- """
- return self._index
-
- @index.setter
- def index(self, index):
- """Sets the index of this ReleaseRef.
-
- Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. # noqa: E501
-
- :param index: The index of this ReleaseRef. # noqa: E501
- :type: int
- """
-
- self._index = index
-
- @property
- def target_release_id(self):
- """Gets the target_release_id of this ReleaseRef. # noqa: E501
-
- Optional, fatcat identifier of release entity that this reference is citing. # noqa: E501
-
- :return: The target_release_id of this ReleaseRef. # noqa: E501
- :rtype: str
- """
- return self._target_release_id
-
- @target_release_id.setter
- def target_release_id(self, target_release_id):
- """Sets the target_release_id of this ReleaseRef.
-
- Optional, fatcat identifier of release entity that this reference is citing. # noqa: E501
-
- :param target_release_id: The target_release_id of this ReleaseRef. # noqa: E501
- :type: str
- """
- if target_release_id is not None and len(target_release_id) > 26:
- raise ValueError("Invalid value for `target_release_id`, length must be less than or equal to `26`") # noqa: E501
- if target_release_id is not None and len(target_release_id) < 26:
- raise ValueError("Invalid value for `target_release_id`, length must be greater than or equal to `26`") # noqa: E501
- if target_release_id is not None and not re.search(r'[a-zA-Z2-7]{26}', target_release_id): # noqa: E501
- raise ValueError(r"Invalid value for `target_release_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._target_release_id = target_release_id
-
- @property
- def extra(self):
- """Gets the extra of this ReleaseRef. # noqa: E501
-
- Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. # noqa: E501
-
- :return: The extra of this ReleaseRef. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this ReleaseRef.
-
- Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. # noqa: E501
-
- :param extra: The extra of this ReleaseRef. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def key(self):
- """Gets the key of this ReleaseRef. # noqa: E501
-
- Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. # noqa: E501
-
- :return: The key of this ReleaseRef. # noqa: E501
- :rtype: str
- """
- return self._key
-
- @key.setter
- def key(self, key):
- """Sets the key of this ReleaseRef.
-
- Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. # noqa: E501
-
- :param key: The key of this ReleaseRef. # noqa: E501
- :type: str
- """
-
- self._key = key
-
- @property
- def year(self):
- """Gets the year of this ReleaseRef. # noqa: E501
-
- Year that the cited work was published in. # noqa: E501
-
- :return: The year of this ReleaseRef. # noqa: E501
- :rtype: int
- """
- return self._year
-
- @year.setter
- def year(self, year):
- """Sets the year of this ReleaseRef.
-
- Year that the cited work was published in. # noqa: E501
-
- :param year: The year of this ReleaseRef. # noqa: E501
- :type: int
- """
-
- self._year = year
-
- @property
- def container_name(self):
- """Gets the container_name of this ReleaseRef. # noqa: E501
-
- Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. # noqa: E501
-
- :return: The container_name of this ReleaseRef. # noqa: E501
- :rtype: str
- """
- return self._container_name
-
- @container_name.setter
- def container_name(self, container_name):
- """Sets the container_name of this ReleaseRef.
-
- Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. # noqa: E501
-
- :param container_name: The container_name of this ReleaseRef. # noqa: E501
- :type: str
- """
-
- self._container_name = container_name
-
- @property
- def title(self):
- """Gets the title of this ReleaseRef. # noqa: E501
-
- Name of the work being cited. # noqa: E501
-
- :return: The title of this ReleaseRef. # noqa: E501
- :rtype: str
- """
- return self._title
-
- @title.setter
- def title(self, title):
- """Sets the title of this ReleaseRef.
-
- Name of the work being cited. # noqa: E501
-
- :param title: The title of this ReleaseRef. # noqa: E501
- :type: str
- """
-
- self._title = title
-
- @property
- def locator(self):
- """Gets the locator of this ReleaseRef. # noqa: E501
-
- Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. # noqa: E501
-
- :return: The locator of this ReleaseRef. # noqa: E501
- :rtype: str
- """
- return self._locator
-
- @locator.setter
- def locator(self, locator):
- """Sets the locator of this ReleaseRef.
-
- Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. # noqa: E501
-
- :param locator: The locator of this ReleaseRef. # noqa: E501
- :type: str
- """
-
- self._locator = locator
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, ReleaseRef):
- 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_openapi_client/fatcat_openapi_client/models/success.py b/python_openapi_client/fatcat_openapi_client/models/success.py
deleted file mode 100644
index 7313d652..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/success.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class Success(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'success': 'bool',
- 'message': 'str'
- }
-
- attribute_map = {
- 'success': 'success',
- 'message': 'message'
- }
-
- def __init__(self, success=None, message=None): # noqa: E501
- """Success - a model defined in OpenAPI""" # noqa: E501
-
- self._success = None
- self._message = None
- self.discriminator = None
-
- self.success = success
- self.message = message
-
- @property
- def success(self):
- """Gets the success of this Success. # noqa: E501
-
-
- :return: The success of this Success. # noqa: E501
- :rtype: bool
- """
- return self._success
-
- @success.setter
- def success(self, success):
- """Sets the success of this Success.
-
-
- :param success: The success of this Success. # noqa: E501
- :type: bool
- """
- if success is None:
- raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501
-
- self._success = success
-
- @property
- def message(self):
- """Gets the message of this Success. # noqa: E501
-
-
- :return: The message of this Success. # noqa: E501
- :rtype: str
- """
- return self._message
-
- @message.setter
- def message(self, message):
- """Sets the message of this Success.
-
-
- :param message: The message of this Success. # noqa: E501
- :type: str
- """
- if message is None:
- raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
-
- self._message = message
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, Success):
- 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_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py
deleted file mode 100644
index 1a021d9b..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WebcaptureAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[WebcaptureEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """WebcaptureAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this WebcaptureAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this WebcaptureAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this WebcaptureAutoBatch.
-
-
- :param editgroup: The editgroup of this WebcaptureAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this WebcaptureAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this WebcaptureAutoBatch. # noqa: E501
- :rtype: list[WebcaptureEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this WebcaptureAutoBatch.
-
-
- :param entity_list: The entity_list of this WebcaptureAutoBatch. # noqa: E501
- :type: list[WebcaptureEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WebcaptureAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py
deleted file mode 100644
index 7787c0c4..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py
+++ /dev/null
@@ -1,327 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WebcaptureCdxLine(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'surt': 'str',
- 'timestamp': 'datetime',
- 'url': 'str',
- 'mimetype': 'str',
- 'status_code': 'int',
- 'size': 'int',
- 'sha1': 'str',
- 'sha256': 'str'
- }
-
- attribute_map = {
- 'surt': 'surt',
- 'timestamp': 'timestamp',
- 'url': 'url',
- 'mimetype': 'mimetype',
- 'status_code': 'status_code',
- 'size': 'size',
- 'sha1': 'sha1',
- 'sha256': 'sha256'
- }
-
- def __init__(self, surt=None, timestamp=None, url=None, mimetype=None, status_code=None, size=None, sha1=None, sha256=None): # noqa: E501
- """WebcaptureCdxLine - a model defined in OpenAPI""" # noqa: E501
-
- self._surt = None
- self._timestamp = None
- self._url = None
- self._mimetype = None
- self._status_code = None
- self._size = None
- self._sha1 = None
- self._sha256 = None
- self.discriminator = None
-
- self.surt = surt
- self.timestamp = timestamp
- self.url = url
- if mimetype is not None:
- self.mimetype = mimetype
- if status_code is not None:
- self.status_code = status_code
- if size is not None:
- self.size = size
- self.sha1 = sha1
- if sha256 is not None:
- self.sha256 = sha256
-
- @property
- def surt(self):
- """Gets the surt of this WebcaptureCdxLine. # noqa: E501
-
- \"Sortable URL\" format. See guide for details. # noqa: E501
-
- :return: The surt of this WebcaptureCdxLine. # noqa: E501
- :rtype: str
- """
- return self._surt
-
- @surt.setter
- def surt(self, surt):
- """Sets the surt of this WebcaptureCdxLine.
-
- \"Sortable URL\" format. See guide for details. # noqa: E501
-
- :param surt: The surt of this WebcaptureCdxLine. # noqa: E501
- :type: str
- """
- if surt is None:
- raise ValueError("Invalid value for `surt`, must not be `None`") # noqa: E501
-
- self._surt = surt
-
- @property
- def timestamp(self):
- """Gets the timestamp of this WebcaptureCdxLine. # noqa: E501
-
- Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision. # noqa: E501
-
- :return: The timestamp of this WebcaptureCdxLine. # noqa: E501
- :rtype: datetime
- """
- return self._timestamp
-
- @timestamp.setter
- def timestamp(self, timestamp):
- """Sets the timestamp of this WebcaptureCdxLine.
-
- Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision. # noqa: E501
-
- :param timestamp: The timestamp of this WebcaptureCdxLine. # noqa: E501
- :type: datetime
- """
- if timestamp is None:
- raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
-
- self._timestamp = timestamp
-
- @property
- def url(self):
- """Gets the url of this WebcaptureCdxLine. # noqa: E501
-
- Full URL/URI of resource captured. # noqa: E501
-
- :return: The url of this WebcaptureCdxLine. # noqa: E501
- :rtype: str
- """
- return self._url
-
- @url.setter
- def url(self, url):
- """Sets the url of this WebcaptureCdxLine.
-
- Full URL/URI of resource captured. # noqa: E501
-
- :param url: The url of this WebcaptureCdxLine. # noqa: E501
- :type: str
- """
- if url is None:
- raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
-
- self._url = url
-
- @property
- def mimetype(self):
- """Gets the mimetype of this WebcaptureCdxLine. # noqa: E501
-
- Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. # noqa: E501
-
- :return: The mimetype of this WebcaptureCdxLine. # noqa: E501
- :rtype: str
- """
- return self._mimetype
-
- @mimetype.setter
- def mimetype(self, mimetype):
- """Sets the mimetype of this WebcaptureCdxLine.
-
- Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. # noqa: E501
-
- :param mimetype: The mimetype of this WebcaptureCdxLine. # noqa: E501
- :type: str
- """
-
- self._mimetype = mimetype
-
- @property
- def status_code(self):
- """Gets the status_code of this WebcaptureCdxLine. # noqa: E501
-
- HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. # noqa: E501
-
- :return: The status_code of this WebcaptureCdxLine. # noqa: E501
- :rtype: int
- """
- return self._status_code
-
- @status_code.setter
- def status_code(self, status_code):
- """Sets the status_code of this WebcaptureCdxLine.
-
- HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. # noqa: E501
-
- :param status_code: The status_code of this WebcaptureCdxLine. # noqa: E501
- :type: int
- """
-
- self._status_code = status_code
-
- @property
- def size(self):
- """Gets the size of this WebcaptureCdxLine. # noqa: E501
-
- Resource (file) size in bytes # noqa: E501
-
- :return: The size of this WebcaptureCdxLine. # noqa: E501
- :rtype: int
- """
- return self._size
-
- @size.setter
- def size(self, size):
- """Sets the size of this WebcaptureCdxLine.
-
- Resource (file) size in bytes # noqa: E501
-
- :param size: The size of this WebcaptureCdxLine. # noqa: E501
- :type: int
- """
-
- self._size = size
-
- @property
- def sha1(self):
- """Gets the sha1 of this WebcaptureCdxLine. # noqa: E501
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :return: The sha1 of this WebcaptureCdxLine. # noqa: E501
- :rtype: str
- """
- return self._sha1
-
- @sha1.setter
- def sha1(self, sha1):
- """Sets the sha1 of this WebcaptureCdxLine.
-
- SHA-1 hash of data, in hex encoding # noqa: E501
-
- :param sha1: The sha1 of this WebcaptureCdxLine. # noqa: E501
- :type: str
- """
- if sha1 is None:
- raise ValueError("Invalid value for `sha1`, must not be `None`") # noqa: E501
- if sha1 is not None and len(sha1) > 40:
- raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501
- if sha1 is not None and len(sha1) < 40:
- raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501
- if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501
- raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501
-
- self._sha1 = sha1
-
- @property
- def sha256(self):
- """Gets the sha256 of this WebcaptureCdxLine. # noqa: E501
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :return: The sha256 of this WebcaptureCdxLine. # noqa: E501
- :rtype: str
- """
- return self._sha256
-
- @sha256.setter
- def sha256(self, sha256):
- """Sets the sha256 of this WebcaptureCdxLine.
-
- SHA-256 hash of data, in hex encoding # noqa: E501
-
- :param sha256: The sha256 of this WebcaptureCdxLine. # noqa: E501
- :type: str
- """
- if sha256 is not None and len(sha256) > 64:
- raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501
- if sha256 is not None and len(sha256) < 64:
- raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501
- if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501
- raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501
-
- self._sha256 = sha256
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WebcaptureCdxLine):
- 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_openapi_client/fatcat_openapi_client/models/webcapture_entity.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py
deleted file mode 100644
index 968b0b1c..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py
+++ /dev/null
@@ -1,467 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.5.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WebcaptureEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)',
- 'cdx': 'list[WebcaptureCdxLine]',
- 'archive_urls': 'list[WebcaptureUrl]',
- 'original_url': 'str',
- 'timestamp': 'datetime',
- 'content_scope': 'str',
- 'release_ids': 'list[str]',
- 'releases': 'list[ReleaseEntity]'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra',
- 'cdx': 'cdx',
- 'archive_urls': 'archive_urls',
- 'original_url': 'original_url',
- 'timestamp': 'timestamp',
- 'content_scope': 'content_scope',
- 'release_ids': 'release_ids',
- 'releases': 'releases'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, cdx=None, archive_urls=None, original_url=None, timestamp=None, content_scope=None, release_ids=None, releases=None): # noqa: E501
- """WebcaptureEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self._cdx = None
- self._archive_urls = None
- self._original_url = None
- self._timestamp = None
- self._content_scope = None
- self._release_ids = None
- self._releases = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
- if cdx is not None:
- self.cdx = cdx
- if archive_urls is not None:
- self.archive_urls = archive_urls
- if original_url is not None:
- self.original_url = original_url
- if timestamp is not None:
- self.timestamp = timestamp
- if content_scope is not None:
- self.content_scope = content_scope
- if release_ids is not None:
- self.release_ids = release_ids
- if releases is not None:
- self.releases = releases
-
- @property
- def state(self):
- """Gets the state of this WebcaptureEntity. # noqa: E501
-
-
- :return: The state of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this WebcaptureEntity.
-
-
- :param state: The state of this WebcaptureEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this WebcaptureEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this WebcaptureEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this WebcaptureEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this WebcaptureEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this WebcaptureEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this WebcaptureEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this WebcaptureEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this WebcaptureEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this WebcaptureEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this WebcaptureEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this WebcaptureEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this WebcaptureEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this WebcaptureEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this WebcaptureEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this WebcaptureEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this WebcaptureEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this WebcaptureEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- @property
- def cdx(self):
- """Gets the cdx of this WebcaptureEntity. # noqa: E501
-
-
- :return: The cdx of this WebcaptureEntity. # noqa: E501
- :rtype: list[WebcaptureCdxLine]
- """
- return self._cdx
-
- @cdx.setter
- def cdx(self, cdx):
- """Sets the cdx of this WebcaptureEntity.
-
-
- :param cdx: The cdx of this WebcaptureEntity. # noqa: E501
- :type: list[WebcaptureCdxLine]
- """
-
- self._cdx = cdx
-
- @property
- def archive_urls(self):
- """Gets the archive_urls of this WebcaptureEntity. # noqa: E501
-
-
- :return: The archive_urls of this WebcaptureEntity. # noqa: E501
- :rtype: list[WebcaptureUrl]
- """
- return self._archive_urls
-
- @archive_urls.setter
- def archive_urls(self, archive_urls):
- """Sets the archive_urls of this WebcaptureEntity.
-
-
- :param archive_urls: The archive_urls of this WebcaptureEntity. # noqa: E501
- :type: list[WebcaptureUrl]
- """
-
- self._archive_urls = archive_urls
-
- @property
- def original_url(self):
- """Gets the original_url of this WebcaptureEntity. # noqa: E501
-
- Base URL of the primary resource this is a capture of # noqa: E501
-
- :return: The original_url of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._original_url
-
- @original_url.setter
- def original_url(self, original_url):
- """Sets the original_url of this WebcaptureEntity.
-
- Base URL of the primary resource this is a capture of # noqa: E501
-
- :param original_url: The original_url of this WebcaptureEntity. # noqa: E501
- :type: str
- """
-
- self._original_url = original_url
-
- @property
- def timestamp(self):
- """Gets the timestamp of this WebcaptureEntity. # noqa: E501
-
- Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. # noqa: E501
-
- :return: The timestamp of this WebcaptureEntity. # noqa: E501
- :rtype: datetime
- """
- return self._timestamp
-
- @timestamp.setter
- def timestamp(self, timestamp):
- """Sets the timestamp of this WebcaptureEntity.
-
- Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. # noqa: E501
-
- :param timestamp: The timestamp of this WebcaptureEntity. # noqa: E501
- :type: datetime
- """
-
- self._timestamp = timestamp
-
- @property
- def content_scope(self):
- """Gets the content_scope of this WebcaptureEntity. # noqa: E501
-
-
- :return: The content_scope of this WebcaptureEntity. # noqa: E501
- :rtype: str
- """
- return self._content_scope
-
- @content_scope.setter
- def content_scope(self, content_scope):
- """Sets the content_scope of this WebcaptureEntity.
-
-
- :param content_scope: The content_scope of this WebcaptureEntity. # noqa: E501
- :type: str
- """
-
- self._content_scope = content_scope
-
- @property
- def release_ids(self):
- """Gets the release_ids of this WebcaptureEntity. # noqa: E501
-
- Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501
-
- :return: The release_ids of this WebcaptureEntity. # noqa: E501
- :rtype: list[str]
- """
- return self._release_ids
-
- @release_ids.setter
- def release_ids(self, release_ids):
- """Sets the release_ids of this WebcaptureEntity.
-
- Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501
-
- :param release_ids: The release_ids of this WebcaptureEntity. # noqa: E501
- :type: list[str]
- """
-
- self._release_ids = release_ids
-
- @property
- def releases(self):
- """Gets the releases of this WebcaptureEntity. # noqa: E501
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :return: The releases of this WebcaptureEntity. # noqa: E501
- :rtype: list[ReleaseEntity]
- """
- return self._releases
-
- @releases.setter
- def releases(self, releases):
- """Sets the releases of this WebcaptureEntity.
-
- Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501
-
- :param releases: The releases of this WebcaptureEntity. # noqa: E501
- :type: list[ReleaseEntity]
- """
-
- self._releases = releases
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WebcaptureEntity):
- 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_openapi_client/fatcat_openapi_client/models/webcapture_url.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py
deleted file mode 100644
index f9740c61..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WebcaptureUrl(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'url': 'str',
- 'rel': 'str'
- }
-
- attribute_map = {
- 'url': 'url',
- 'rel': 'rel'
- }
-
- def __init__(self, url=None, rel=None): # noqa: E501
- """WebcaptureUrl - a model defined in OpenAPI""" # noqa: E501
-
- self._url = None
- self._rel = None
- self.discriminator = None
-
- self.url = url
- self.rel = rel
-
- @property
- def url(self):
- """Gets the url of this WebcaptureUrl. # noqa: E501
-
- URL/URI pointing to archive of this web resource. # noqa: E501
-
- :return: The url of this WebcaptureUrl. # noqa: E501
- :rtype: str
- """
- return self._url
-
- @url.setter
- def url(self, url):
- """Sets the url of this WebcaptureUrl.
-
- URL/URI pointing to archive of this web resource. # noqa: E501
-
- :param url: The url of this WebcaptureUrl. # noqa: E501
- :type: str
- """
- if url is None:
- raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
-
- self._url = url
-
- @property
- def rel(self):
- """Gets the rel of this WebcaptureUrl. # noqa: E501
-
- Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list. # noqa: E501
-
- :return: The rel of this WebcaptureUrl. # noqa: E501
- :rtype: str
- """
- return self._rel
-
- @rel.setter
- def rel(self, rel):
- """Sets the rel of this WebcaptureUrl.
-
- Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list. # noqa: E501
-
- :param rel: The rel of this WebcaptureUrl. # noqa: E501
- :type: str
- """
- if rel is None:
- raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501
-
- self._rel = rel
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WebcaptureUrl):
- 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_openapi_client/fatcat_openapi_client/models/work_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py
deleted file mode 100644
index b403c850..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WorkAutoBatch(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'editgroup': 'Editgroup',
- 'entity_list': 'list[WorkEntity]'
- }
-
- attribute_map = {
- 'editgroup': 'editgroup',
- 'entity_list': 'entity_list'
- }
-
- def __init__(self, editgroup=None, entity_list=None): # noqa: E501
- """WorkAutoBatch - a model defined in OpenAPI""" # noqa: E501
-
- self._editgroup = None
- self._entity_list = None
- self.discriminator = None
-
- self.editgroup = editgroup
- self.entity_list = entity_list
-
- @property
- def editgroup(self):
- """Gets the editgroup of this WorkAutoBatch. # noqa: E501
-
-
- :return: The editgroup of this WorkAutoBatch. # noqa: E501
- :rtype: Editgroup
- """
- return self._editgroup
-
- @editgroup.setter
- def editgroup(self, editgroup):
- """Sets the editgroup of this WorkAutoBatch.
-
-
- :param editgroup: The editgroup of this WorkAutoBatch. # noqa: E501
- :type: Editgroup
- """
- if editgroup is None:
- raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501
-
- self._editgroup = editgroup
-
- @property
- def entity_list(self):
- """Gets the entity_list of this WorkAutoBatch. # noqa: E501
-
-
- :return: The entity_list of this WorkAutoBatch. # noqa: E501
- :rtype: list[WorkEntity]
- """
- return self._entity_list
-
- @entity_list.setter
- def entity_list(self, entity_list):
- """Sets the entity_list of this WorkAutoBatch.
-
-
- :param entity_list: The entity_list of this WorkAutoBatch. # noqa: E501
- :type: list[WorkEntity]
- """
- if entity_list is None:
- raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501
-
- self._entity_list = entity_list
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WorkAutoBatch):
- 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_openapi_client/fatcat_openapi_client/models/work_entity.py b/python_openapi_client/fatcat_openapi_client/models/work_entity.py
deleted file mode 100644
index 25f81e96..00000000
--- a/python_openapi_client/fatcat_openapi_client/models/work_entity.py
+++ /dev/null
@@ -1,277 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.3.1
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class WorkEntity(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_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.
- """
- openapi_types = {
- 'state': 'str',
- 'ident': 'str',
- 'revision': 'str',
- 'redirect': 'str',
- 'extra': 'dict(str, object)',
- 'edit_extra': 'dict(str, object)'
- }
-
- attribute_map = {
- 'state': 'state',
- 'ident': 'ident',
- 'revision': 'revision',
- 'redirect': 'redirect',
- 'extra': 'extra',
- 'edit_extra': 'edit_extra'
- }
-
- def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501
- """WorkEntity - a model defined in OpenAPI""" # noqa: E501
-
- self._state = None
- self._ident = None
- self._revision = None
- self._redirect = None
- self._extra = None
- self._edit_extra = None
- self.discriminator = None
-
- if state is not None:
- self.state = state
- if ident is not None:
- self.ident = ident
- if revision is not None:
- self.revision = revision
- if redirect is not None:
- self.redirect = redirect
- if extra is not None:
- self.extra = extra
- if edit_extra is not None:
- self.edit_extra = edit_extra
-
- @property
- def state(self):
- """Gets the state of this WorkEntity. # noqa: E501
-
-
- :return: The state of this WorkEntity. # noqa: E501
- :rtype: str
- """
- return self._state
-
- @state.setter
- def state(self, state):
- """Sets the state of this WorkEntity.
-
-
- :param state: The state of this WorkEntity. # noqa: E501
- :type: str
- """
- allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501
- if state not in allowed_values:
- raise ValueError(
- "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501
- .format(state, allowed_values)
- )
-
- self._state = state
-
- @property
- def ident(self):
- """Gets the ident of this WorkEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The ident of this WorkEntity. # noqa: E501
- :rtype: str
- """
- return self._ident
-
- @ident.setter
- def ident(self, ident):
- """Sets the ident of this WorkEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param ident: The ident of this WorkEntity. # noqa: E501
- :type: str
- """
- if ident is not None and len(ident) > 26:
- raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501
- if ident is not None and len(ident) < 26:
- raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501
- if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501
- raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._ident = ident
-
- @property
- def revision(self):
- """Gets the revision of this WorkEntity. # noqa: E501
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :return: The revision of this WorkEntity. # noqa: E501
- :rtype: str
- """
- return self._revision
-
- @revision.setter
- def revision(self, revision):
- """Sets the revision of this WorkEntity.
-
- UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501
-
- :param revision: The revision of this WorkEntity. # noqa: E501
- :type: str
- """
- if revision is not None and len(revision) > 36:
- raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501
- if revision is not None and len(revision) < 36:
- raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501
- if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501
- raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501
-
- self._revision = revision
-
- @property
- def redirect(self):
- """Gets the redirect of this WorkEntity. # noqa: E501
-
- base32-encoded unique identifier # noqa: E501
-
- :return: The redirect of this WorkEntity. # noqa: E501
- :rtype: str
- """
- return self._redirect
-
- @redirect.setter
- def redirect(self, redirect):
- """Sets the redirect of this WorkEntity.
-
- base32-encoded unique identifier # noqa: E501
-
- :param redirect: The redirect of this WorkEntity. # noqa: E501
- :type: str
- """
- if redirect is not None and len(redirect) > 26:
- raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501
- if redirect is not None and len(redirect) < 26:
- raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501
- if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501
- raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501
-
- self._redirect = redirect
-
- @property
- def extra(self):
- """Gets the extra of this WorkEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :return: The extra of this WorkEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._extra
-
- @extra.setter
- def extra(self, extra):
- """Sets the extra of this WorkEntity.
-
- Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501
-
- :param extra: The extra of this WorkEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._extra = extra
-
- @property
- def edit_extra(self):
- """Gets the edit_extra of this WorkEntity. # noqa: E501
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :return: The edit_extra of this WorkEntity. # noqa: E501
- :rtype: dict(str, object)
- """
- return self._edit_extra
-
- @edit_extra.setter
- def edit_extra(self, edit_extra):
- """Sets the edit_extra of this WorkEntity.
-
- Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501
-
- :param edit_extra: The edit_extra of this WorkEntity. # noqa: E501
- :type: dict(str, object)
- """
-
- self._edit_extra = edit_extra
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_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, WorkEntity):
- 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_openapi_client/fatcat_openapi_client/rest.py b/python_openapi_client/fatcat_openapi_client/rest.py
index d049b537..5a599e36 100644
--- a/python_openapi_client/fatcat_openapi_client/rest.py
+++ b/python_openapi_client/fatcat_openapi_client/rest.py
@@ -1,31 +1,26 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
import io
import json
import logging
import re
import ssl
-
-import certifi
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import urlencode
+from urllib.parse import urlencode
+from urllib.parse import urlparse
+from urllib.request import proxy_bypass_environment
import urllib3
+import ipaddress
-from fatcat_openapi_client.exceptions import ApiException, ApiValueError
+from fatcat_openapi_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError
logger = logging.getLogger(__name__)
@@ -63,13 +58,6 @@ class RESTClientObject(object):
else:
cert_reqs = ssl.CERT_NONE
- # ca_certs
- if configuration.ssl_ca_cert:
- ca_certs = configuration.ssl_ca_cert
- else:
- # if not set certificate file, use Mozilla's root certificates.
- ca_certs = certifi.where()
-
addition_pool_args = {}
if configuration.assert_hostname is not None:
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
@@ -77,6 +65,9 @@ class RESTClientObject(object):
if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries
+ if configuration.socket_options is not None:
+ addition_pool_args['socket_options'] = configuration.socket_options
+
if maxsize is None:
if configuration.connection_pool_maxsize is not None:
maxsize = configuration.connection_pool_maxsize
@@ -84,12 +75,13 @@ class RESTClientObject(object):
maxsize = 4
# https pool manager
- if configuration.proxy:
+ if configuration.proxy and not should_bypass_proxies(
+ configuration.host, no_proxy=configuration.no_proxy or ''):
self.pool_manager = urllib3.ProxyManager(
num_pools=pools_size,
maxsize=maxsize,
cert_reqs=cert_reqs,
- ca_certs=ca_certs,
+ ca_certs=configuration.ssl_ca_cert,
cert_file=configuration.cert_file,
key_file=configuration.key_file,
proxy_url=configuration.proxy,
@@ -101,7 +93,7 @@ class RESTClientObject(object):
num_pools=pools_size,
maxsize=maxsize,
cert_reqs=cert_reqs,
- ca_certs=ca_certs,
+ ca_certs=configuration.ssl_ca_cert,
cert_file=configuration.cert_file,
key_file=configuration.key_file,
**addition_pool_args
@@ -142,22 +134,23 @@ class RESTClientObject(object):
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
+ if isinstance(_request_timeout, (int, float)): # noqa: E501,F821
timeout = urllib3.Timeout(total=_request_timeout)
elif (isinstance(_request_timeout, tuple) and
len(_request_timeout) == 2):
timeout = urllib3.Timeout(
connect=_request_timeout[0], read=_request_timeout[1])
- if 'Content-Type' not in headers:
- headers['Content-Type'] = 'application/json'
-
try:
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
+ # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests
+ if (method != 'DELETE') and ('Content-Type' not in headers):
+ headers['Content-Type'] = 'application/json'
if query_params:
url += '?' + urlencode(query_params)
- if re.search('json', headers['Content-Type'], re.IGNORECASE):
+ if ('Content-Type' not in headers) or (re.search('json',
+ headers['Content-Type'], re.IGNORECASE)):
request_body = None
if body is not None:
request_body = json.dumps(body)
@@ -218,15 +211,22 @@ class RESTClientObject(object):
if _preload_content:
r = RESTResponse(r)
- # In the python 3, the response.data is bytes.
- # we need to decode it to string.
- if six.PY3:
- r.data = r.data.decode('utf8')
-
# log response body
logger.debug("response body: %s", r.data)
if not 200 <= r.status <= 299:
+ if r.status == 401:
+ raise UnauthorizedException(http_resp=r)
+
+ if r.status == 403:
+ raise ForbiddenException(http_resp=r)
+
+ if r.status == 404:
+ raise NotFoundException(http_resp=r)
+
+ if 500 <= r.status <= 599:
+ raise ServiceException(http_resp=r)
+
raise ApiException(http_resp=r)
return r
@@ -295,3 +295,59 @@ class RESTClientObject(object):
_preload_content=_preload_content,
_request_timeout=_request_timeout,
body=body)
+
+# end of class RESTClientObject
+
+
+def is_ipv4(target):
+ """ Test if IPv4 address or not
+ """
+ try:
+ chk = ipaddress.IPv4Address(target)
+ return True
+ except ipaddress.AddressValueError:
+ return False
+
+
+def in_ipv4net(target, net):
+ """ Test if target belongs to given IPv4 network
+ """
+ try:
+ nw = ipaddress.IPv4Network(net)
+ ip = ipaddress.IPv4Address(target)
+ if ip in nw:
+ return True
+ return False
+ except ipaddress.AddressValueError:
+ return False
+ except ipaddress.NetmaskValueError:
+ return False
+
+
+def should_bypass_proxies(url, no_proxy=None):
+ """ Yet another requests.should_bypass_proxies
+ Test if proxies should not be used for a particular url.
+ """
+
+ parsed = urlparse(url)
+
+ # special cases
+ if parsed.hostname in [None, '']:
+ return True
+
+ # special cases
+ if no_proxy in [None, '']:
+ return False
+ if no_proxy == '*':
+ return True
+
+ no_proxy = no_proxy.lower().replace(' ', '');
+ entries = (
+ host for host in no_proxy.split(',') if host
+ )
+
+ if is_ipv4(parsed.hostname):
+ for item in entries:
+ if in_ipv4net(parsed.hostname, item):
+ return True
+ return proxy_bypass_environment(parsed.hostname, {'no': no_proxy})
diff --git a/python_openapi_client/tests/codegen/test_auth_api.py b/python_openapi_client/tests/codegen/test_auth_api.py
new file mode 100644
index 00000000..ce3c83cc
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_auth_api.py
@@ -0,0 +1,47 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.auth_api import AuthApi # noqa: E501
+
+
+class TestAuthApi(unittest.TestCase):
+ """AuthApi unit test stubs"""
+
+ def setUp(self):
+ self.api = AuthApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_auth_check(self):
+ """Test case for auth_check
+
+ """
+ pass
+
+ def test_auth_oidc(self):
+ """Test case for auth_oidc
+
+ """
+ pass
+
+ def test_create_auth_token(self):
+ """Test case for create_auth_token
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_auth_oidc.py b/python_openapi_client/tests/codegen/test_auth_oidc.py
index dcc42eb9..0fac3c20 100644
--- a/python_openapi_client/tests/codegen/test_auth_oidc.py
+++ b/python_openapi_client/tests/codegen/test_auth_oidc.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.auth_oidc import AuthOidc # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.auth_oidc import AuthOidc
class TestAuthOidc(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestAuthOidc(unittest.TestCase):
def testAuthOidc(self):
"""Test AuthOidc"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.auth_oidc.AuthOidc() # noqa: E501
+ # model = AuthOidc() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_auth_oidc_result.py b/python_openapi_client/tests/codegen/test_auth_oidc_result.py
index 0cf10899..3cb13568 100644
--- a/python_openapi_client/tests/codegen/test_auth_oidc_result.py
+++ b/python_openapi_client/tests/codegen/test_auth_oidc_result.py
@@ -1,23 +1,21 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.auth_oidc_result import AuthOidcResult # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editor import Editor
+globals()['Editor'] = Editor
+from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult
class TestAuthOidcResult(unittest.TestCase):
@@ -32,7 +30,7 @@ class TestAuthOidcResult(unittest.TestCase):
def testAuthOidcResult(self):
"""Test AuthOidcResult"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.auth_oidc_result.AuthOidcResult() # noqa: E501
+ # model = AuthOidcResult() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_auth_token_result.py b/python_openapi_client/tests/codegen/test_auth_token_result.py
index 2385fa25..829ff003 100644
--- a/python_openapi_client/tests/codegen/test_auth_token_result.py
+++ b/python_openapi_client/tests/codegen/test_auth_token_result.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.auth_token_result import AuthTokenResult # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.auth_token_result import AuthTokenResult
class TestAuthTokenResult(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestAuthTokenResult(unittest.TestCase):
def testAuthTokenResult(self):
"""Test AuthTokenResult"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.auth_token_result.AuthTokenResult() # noqa: E501
+ # model = AuthTokenResult() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_changelog_api.py b/python_openapi_client/tests/codegen/test_changelog_api.py
new file mode 100644
index 00000000..c2144f18
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_changelog_api.py
@@ -0,0 +1,41 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.changelog_api import ChangelogApi # noqa: E501
+
+
+class TestChangelogApi(unittest.TestCase):
+ """ChangelogApi unit test stubs"""
+
+ def setUp(self):
+ self.api = ChangelogApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_get_changelog(self):
+ """Test case for get_changelog
+
+ """
+ pass
+
+ def test_get_changelog_entry(self):
+ """Test case for get_changelog_entry
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_changelog_entry.py b/python_openapi_client/tests/codegen/test_changelog_entry.py
index 3e7e1b99..6e9ac6f7 100644
--- a/python_openapi_client/tests/codegen/test_changelog_entry.py
+++ b/python_openapi_client/tests/codegen/test_changelog_entry.py
@@ -1,23 +1,21 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.changelog_entry import ChangelogEntry # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+globals()['Editgroup'] = Editgroup
+from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
class TestChangelogEntry(unittest.TestCase):
@@ -32,7 +30,7 @@ class TestChangelogEntry(unittest.TestCase):
def testChangelogEntry(self):
"""Test ChangelogEntry"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.changelog_entry.ChangelogEntry() # noqa: E501
+ # model = ChangelogEntry() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_container_auto_batch.py b/python_openapi_client/tests/codegen/test_container_auto_batch.py
index 6107ff3b..43548a06 100644
--- a/python_openapi_client/tests/codegen/test_container_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_container_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.container_auto_batch import ContainerAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.container_entity import ContainerEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+globals()['ContainerEntity'] = ContainerEntity
+globals()['Editgroup'] = Editgroup
+from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch
class TestContainerAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestContainerAutoBatch(unittest.TestCase):
def testContainerAutoBatch(self):
"""Test ContainerAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.container_auto_batch.ContainerAutoBatch() # noqa: E501
+ # model = ContainerAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_container_entity.py b/python_openapi_client/tests/codegen/test_container_entity.py
index 418fd8e3..54b2307e 100644
--- a/python_openapi_client/tests/codegen/test_container_entity.py
+++ b/python_openapi_client/tests/codegen/test_container_entity.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.container_entity import ContainerEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.container_entity import ContainerEntity
class TestContainerEntity(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestContainerEntity(unittest.TestCase):
def testContainerEntity(self):
"""Test ContainerEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.container_entity.ContainerEntity() # noqa: E501
+ # model = ContainerEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_containers_api.py b/python_openapi_client/tests/codegen/test_containers_api.py
new file mode 100644
index 00000000..f6b752cc
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_containers_api.py
@@ -0,0 +1,95 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.containers_api import ContainersApi # noqa: E501
+
+
+class TestContainersApi(unittest.TestCase):
+ """ContainersApi unit test stubs"""
+
+ def setUp(self):
+ self.api = ContainersApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_container(self):
+ """Test case for create_container
+
+ """
+ pass
+
+ def test_create_container_auto_batch(self):
+ """Test case for create_container_auto_batch
+
+ """
+ pass
+
+ def test_delete_container(self):
+ """Test case for delete_container
+
+ """
+ pass
+
+ def test_delete_container_edit(self):
+ """Test case for delete_container_edit
+
+ """
+ pass
+
+ def test_get_container(self):
+ """Test case for get_container
+
+ """
+ pass
+
+ def test_get_container_edit(self):
+ """Test case for get_container_edit
+
+ """
+ pass
+
+ def test_get_container_history(self):
+ """Test case for get_container_history
+
+ """
+ pass
+
+ def test_get_container_redirects(self):
+ """Test case for get_container_redirects
+
+ """
+ pass
+
+ def test_get_container_revision(self):
+ """Test case for get_container_revision
+
+ """
+ pass
+
+ def test_lookup_container(self):
+ """Test case for lookup_container
+
+ """
+ pass
+
+ def test_update_container(self):
+ """Test case for update_container
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_creator_auto_batch.py b/python_openapi_client/tests/codegen/test_creator_auto_batch.py
index de00b2a1..aea5108e 100644
--- a/python_openapi_client/tests/codegen/test_creator_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_creator_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.creator_auto_batch import CreatorAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
+from fatcat_openapi_client.model.editgroup import Editgroup
+globals()['CreatorEntity'] = CreatorEntity
+globals()['Editgroup'] = Editgroup
+from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch
class TestCreatorAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestCreatorAutoBatch(unittest.TestCase):
def testCreatorAutoBatch(self):
"""Test CreatorAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.creator_auto_batch.CreatorAutoBatch() # noqa: E501
+ # model = CreatorAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_creator_entity.py b/python_openapi_client/tests/codegen/test_creator_entity.py
index b019bbe8..29d4f643 100644
--- a/python_openapi_client/tests/codegen/test_creator_entity.py
+++ b/python_openapi_client/tests/codegen/test_creator_entity.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.creator_entity import CreatorEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
class TestCreatorEntity(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestCreatorEntity(unittest.TestCase):
def testCreatorEntity(self):
"""Test CreatorEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.creator_entity.CreatorEntity() # noqa: E501
+ # model = CreatorEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_creators_api.py b/python_openapi_client/tests/codegen/test_creators_api.py
new file mode 100644
index 00000000..f0014a0c
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_creators_api.py
@@ -0,0 +1,101 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.creators_api import CreatorsApi # noqa: E501
+
+
+class TestCreatorsApi(unittest.TestCase):
+ """CreatorsApi unit test stubs"""
+
+ def setUp(self):
+ self.api = CreatorsApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_creator(self):
+ """Test case for create_creator
+
+ """
+ pass
+
+ def test_create_creator_auto_batch(self):
+ """Test case for create_creator_auto_batch
+
+ """
+ pass
+
+ def test_delete_creator(self):
+ """Test case for delete_creator
+
+ """
+ pass
+
+ def test_delete_creator_edit(self):
+ """Test case for delete_creator_edit
+
+ """
+ pass
+
+ def test_get_creator(self):
+ """Test case for get_creator
+
+ """
+ pass
+
+ def test_get_creator_edit(self):
+ """Test case for get_creator_edit
+
+ """
+ pass
+
+ def test_get_creator_history(self):
+ """Test case for get_creator_history
+
+ """
+ pass
+
+ def test_get_creator_redirects(self):
+ """Test case for get_creator_redirects
+
+ """
+ pass
+
+ def test_get_creator_releases(self):
+ """Test case for get_creator_releases
+
+ """
+ pass
+
+ def test_get_creator_revision(self):
+ """Test case for get_creator_revision
+
+ """
+ pass
+
+ def test_lookup_creator(self):
+ """Test case for lookup_creator
+
+ """
+ pass
+
+ def test_update_creator(self):
+ """Test case for update_creator
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_default_api.py b/python_openapi_client/tests/codegen/test_default_api.py
deleted file mode 100644
index c86c1e80..00000000
--- a/python_openapi_client/tests/codegen/test_default_api.py
+++ /dev/null
@@ -1,610 +0,0 @@
-# coding: utf-8
-
-"""
- fatcat
-
- Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
-
- The version of the OpenAPI document: 0.4.0
- Contact: webservices@archive.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-from __future__ import absolute_import
-
-import unittest
-
-import fatcat_openapi_client
-from fatcat_openapi_client.api.default_api import DefaultApi # noqa: E501
-from fatcat_openapi_client.rest import ApiException
-
-
-class TestDefaultApi(unittest.TestCase):
- """DefaultApi unit test stubs"""
-
- def setUp(self):
- self.api = fatcat_openapi_client.api.default_api.DefaultApi() # noqa: E501
-
- def tearDown(self):
- pass
-
- def test_accept_editgroup(self):
- """Test case for accept_editgroup
-
- """
- pass
-
- def test_auth_check(self):
- """Test case for auth_check
-
- """
- pass
-
- def test_auth_oidc(self):
- """Test case for auth_oidc
-
- """
- pass
-
- def test_create_auth_token(self):
- """Test case for create_auth_token
-
- """
- pass
-
- def test_create_container(self):
- """Test case for create_container
-
- """
- pass
-
- def test_create_container_auto_batch(self):
- """Test case for create_container_auto_batch
-
- """
- pass
-
- def test_create_creator(self):
- """Test case for create_creator
-
- """
- pass
-
- def test_create_creator_auto_batch(self):
- """Test case for create_creator_auto_batch
-
- """
- pass
-
- def test_create_editgroup(self):
- """Test case for create_editgroup
-
- """
- pass
-
- def test_create_editgroup_annotation(self):
- """Test case for create_editgroup_annotation
-
- """
- pass
-
- def test_create_file(self):
- """Test case for create_file
-
- """
- pass
-
- def test_create_file_auto_batch(self):
- """Test case for create_file_auto_batch
-
- """
- pass
-
- def test_create_fileset(self):
- """Test case for create_fileset
-
- """
- pass
-
- def test_create_fileset_auto_batch(self):
- """Test case for create_fileset_auto_batch
-
- """
- pass
-
- def test_create_release(self):
- """Test case for create_release
-
- """
- pass
-
- def test_create_release_auto_batch(self):
- """Test case for create_release_auto_batch
-
- """
- pass
-
- def test_create_webcapture(self):
- """Test case for create_webcapture
-
- """
- pass
-
- def test_create_webcapture_auto_batch(self):
- """Test case for create_webcapture_auto_batch
-
- """
- pass
-
- def test_create_work(self):
- """Test case for create_work
-
- """
- pass
-
- def test_create_work_auto_batch(self):
- """Test case for create_work_auto_batch
-
- """
- pass
-
- def test_delete_container(self):
- """Test case for delete_container
-
- """
- pass
-
- def test_delete_container_edit(self):
- """Test case for delete_container_edit
-
- """
- pass
-
- def test_delete_creator(self):
- """Test case for delete_creator
-
- """
- pass
-
- def test_delete_creator_edit(self):
- """Test case for delete_creator_edit
-
- """
- pass
-
- def test_delete_file(self):
- """Test case for delete_file
-
- """
- pass
-
- def test_delete_file_edit(self):
- """Test case for delete_file_edit
-
- """
- pass
-
- def test_delete_fileset(self):
- """Test case for delete_fileset
-
- """
- pass
-
- def test_delete_fileset_edit(self):
- """Test case for delete_fileset_edit
-
- """
- pass
-
- def test_delete_release(self):
- """Test case for delete_release
-
- """
- pass
-
- def test_delete_release_edit(self):
- """Test case for delete_release_edit
-
- """
- pass
-
- def test_delete_webcapture(self):
- """Test case for delete_webcapture
-
- """
- pass
-
- def test_delete_webcapture_edit(self):
- """Test case for delete_webcapture_edit
-
- """
- pass
-
- def test_delete_work(self):
- """Test case for delete_work
-
- """
- pass
-
- def test_delete_work_edit(self):
- """Test case for delete_work_edit
-
- """
- pass
-
- def test_get_changelog(self):
- """Test case for get_changelog
-
- """
- pass
-
- def test_get_changelog_entry(self):
- """Test case for get_changelog_entry
-
- """
- pass
-
- def test_get_container(self):
- """Test case for get_container
-
- """
- pass
-
- def test_get_container_edit(self):
- """Test case for get_container_edit
-
- """
- pass
-
- def test_get_container_history(self):
- """Test case for get_container_history
-
- """
- pass
-
- def test_get_container_redirects(self):
- """Test case for get_container_redirects
-
- """
- pass
-
- def test_get_container_revision(self):
- """Test case for get_container_revision
-
- """
- pass
-
- def test_get_creator(self):
- """Test case for get_creator
-
- """
- pass
-
- def test_get_creator_edit(self):
- """Test case for get_creator_edit
-
- """
- pass
-
- def test_get_creator_history(self):
- """Test case for get_creator_history
-
- """
- pass
-
- def test_get_creator_redirects(self):
- """Test case for get_creator_redirects
-
- """
- pass
-
- def test_get_creator_releases(self):
- """Test case for get_creator_releases
-
- """
- pass
-
- def test_get_creator_revision(self):
- """Test case for get_creator_revision
-
- """
- pass
-
- def test_get_editgroup(self):
- """Test case for get_editgroup
-
- """
- pass
-
- def test_get_editgroup_annotations(self):
- """Test case for get_editgroup_annotations
-
- """
- pass
-
- def test_get_editgroups_reviewable(self):
- """Test case for get_editgroups_reviewable
-
- """
- pass
-
- def test_get_editor(self):
- """Test case for get_editor
-
- """
- pass
-
- def test_get_editor_annotations(self):
- """Test case for get_editor_annotations
-
- """
- pass
-
- def test_get_editor_editgroups(self):
- """Test case for get_editor_editgroups
-
- """
- pass
-
- def test_get_file(self):
- """Test case for get_file
-
- """
- pass
-
- def test_get_file_edit(self):
- """Test case for get_file_edit
-
- """
- pass
-
- def test_get_file_history(self):
- """Test case for get_file_history
-
- """
- pass
-
- def test_get_file_redirects(self):
- """Test case for get_file_redirects
-
- """
- pass
-
- def test_get_file_revision(self):
- """Test case for get_file_revision
-
- """
- pass
-
- def test_get_fileset(self):
- """Test case for get_fileset
-
- """
- pass
-
- def test_get_fileset_edit(self):
- """Test case for get_fileset_edit
-
- """
- pass
-
- def test_get_fileset_history(self):
- """Test case for get_fileset_history
-
- """
- pass
-
- def test_get_fileset_redirects(self):
- """Test case for get_fileset_redirects
-
- """
- pass
-
- def test_get_fileset_revision(self):
- """Test case for get_fileset_revision
-
- """
- pass
-
- def test_get_release(self):
- """Test case for get_release
-
- """
- pass
-
- def test_get_release_edit(self):
- """Test case for get_release_edit
-
- """
- pass
-
- def test_get_release_files(self):
- """Test case for get_release_files
-
- """
- pass
-
- def test_get_release_filesets(self):
- """Test case for get_release_filesets
-
- """
- pass
-
- def test_get_release_history(self):
- """Test case for get_release_history
-
- """
- pass
-
- def test_get_release_redirects(self):
- """Test case for get_release_redirects
-
- """
- pass
-
- def test_get_release_revision(self):
- """Test case for get_release_revision
-
- """
- pass
-
- def test_get_release_webcaptures(self):
- """Test case for get_release_webcaptures
-
- """
- pass
-
- def test_get_webcapture(self):
- """Test case for get_webcapture
-
- """
- pass
-
- def test_get_webcapture_edit(self):
- """Test case for get_webcapture_edit
-
- """
- pass
-
- def test_get_webcapture_history(self):
- """Test case for get_webcapture_history
-
- """
- pass
-
- def test_get_webcapture_redirects(self):
- """Test case for get_webcapture_redirects
-
- """
- pass
-
- def test_get_webcapture_revision(self):
- """Test case for get_webcapture_revision
-
- """
- pass
-
- def test_get_work(self):
- """Test case for get_work
-
- """
- pass
-
- def test_get_work_edit(self):
- """Test case for get_work_edit
-
- """
- pass
-
- def test_get_work_history(self):
- """Test case for get_work_history
-
- """
- pass
-
- def test_get_work_redirects(self):
- """Test case for get_work_redirects
-
- """
- pass
-
- def test_get_work_releases(self):
- """Test case for get_work_releases
-
- """
- pass
-
- def test_get_work_revision(self):
- """Test case for get_work_revision
-
- """
- pass
-
- def test_lookup_container(self):
- """Test case for lookup_container
-
- """
- pass
-
- def test_lookup_creator(self):
- """Test case for lookup_creator
-
- """
- pass
-
- def test_lookup_editor(self):
- """Test case for lookup_editor
-
- """
- pass
-
- def test_lookup_file(self):
- """Test case for lookup_file
-
- """
- pass
-
- def test_lookup_release(self):
- """Test case for lookup_release
-
- """
- pass
-
- def test_update_container(self):
- """Test case for update_container
-
- """
- pass
-
- def test_update_creator(self):
- """Test case for update_creator
-
- """
- pass
-
- def test_update_editgroup(self):
- """Test case for update_editgroup
-
- """
- pass
-
- def test_update_editor(self):
- """Test case for update_editor
-
- """
- pass
-
- def test_update_file(self):
- """Test case for update_file
-
- """
- pass
-
- def test_update_fileset(self):
- """Test case for update_fileset
-
- """
- pass
-
- def test_update_release(self):
- """Test case for update_release
-
- """
- pass
-
- def test_update_webcapture(self):
- """Test case for update_webcapture
-
- """
- pass
-
- def test_update_work(self):
- """Test case for update_work
-
- """
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_editgroup.py b/python_openapi_client/tests/codegen/test_editgroup.py
index b8e26289..42d6455e 100644
--- a/python_openapi_client/tests/codegen/test_editgroup.py
+++ b/python_openapi_client/tests/codegen/test_editgroup.py
@@ -1,23 +1,25 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.editgroup import Editgroup # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
+from fatcat_openapi_client.model.editgroup_edits import EditgroupEdits
+from fatcat_openapi_client.model.editor import Editor
+globals()['EditgroupAnnotation'] = EditgroupAnnotation
+globals()['EditgroupEdits'] = EditgroupEdits
+globals()['Editor'] = Editor
+from fatcat_openapi_client.model.editgroup import Editgroup
class TestEditgroup(unittest.TestCase):
@@ -32,7 +34,7 @@ class TestEditgroup(unittest.TestCase):
def testEditgroup(self):
"""Test Editgroup"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.editgroup.Editgroup() # noqa: E501
+ # model = Editgroup() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_editgroup_annotation.py b/python_openapi_client/tests/codegen/test_editgroup_annotation.py
index 00657b15..9425c412 100644
--- a/python_openapi_client/tests/codegen/test_editgroup_annotation.py
+++ b/python_openapi_client/tests/codegen/test_editgroup_annotation.py
@@ -1,23 +1,21 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.editgroup_annotation import EditgroupAnnotation # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editor import Editor
+globals()['Editor'] = Editor
+from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation
class TestEditgroupAnnotation(unittest.TestCase):
@@ -32,7 +30,7 @@ class TestEditgroupAnnotation(unittest.TestCase):
def testEditgroupAnnotation(self):
"""Test EditgroupAnnotation"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.editgroup_annotation.EditgroupAnnotation() # noqa: E501
+ # model = EditgroupAnnotation() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_editgroup_edits.py b/python_openapi_client/tests/codegen/test_editgroup_edits.py
index 9883c6c5..77178b93 100644
--- a/python_openapi_client/tests/codegen/test_editgroup_edits.py
+++ b/python_openapi_client/tests/codegen/test_editgroup_edits.py
@@ -1,23 +1,21 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.editgroup_edits import EditgroupEdits # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+globals()['EntityEdit'] = EntityEdit
+from fatcat_openapi_client.model.editgroup_edits import EditgroupEdits
class TestEditgroupEdits(unittest.TestCase):
@@ -32,7 +30,7 @@ class TestEditgroupEdits(unittest.TestCase):
def testEditgroupEdits(self):
"""Test EditgroupEdits"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.editgroup_edits.EditgroupEdits() # noqa: E501
+ # model = EditgroupEdits() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_editgroups_api.py b/python_openapi_client/tests/codegen/test_editgroups_api.py
new file mode 100644
index 00000000..cb7ee184
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_editgroups_api.py
@@ -0,0 +1,71 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.editgroups_api import EditgroupsApi # noqa: E501
+
+
+class TestEditgroupsApi(unittest.TestCase):
+ """EditgroupsApi unit test stubs"""
+
+ def setUp(self):
+ self.api = EditgroupsApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_accept_editgroup(self):
+ """Test case for accept_editgroup
+
+ """
+ pass
+
+ def test_create_editgroup(self):
+ """Test case for create_editgroup
+
+ """
+ pass
+
+ def test_create_editgroup_annotation(self):
+ """Test case for create_editgroup_annotation
+
+ """
+ pass
+
+ def test_get_editgroup(self):
+ """Test case for get_editgroup
+
+ """
+ pass
+
+ def test_get_editgroup_annotations(self):
+ """Test case for get_editgroup_annotations
+
+ """
+ pass
+
+ def test_get_editgroups_reviewable(self):
+ """Test case for get_editgroups_reviewable
+
+ """
+ pass
+
+ def test_update_editgroup(self):
+ """Test case for update_editgroup
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_editor.py b/python_openapi_client/tests/codegen/test_editor.py
index b8fe7bb2..972a138d 100644
--- a/python_openapi_client/tests/codegen/test_editor.py
+++ b/python_openapi_client/tests/codegen/test_editor.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.editor import Editor # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editor import Editor
class TestEditor(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestEditor(unittest.TestCase):
def testEditor(self):
"""Test Editor"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.editor.Editor() # noqa: E501
+ # model = Editor() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_editors_api.py b/python_openapi_client/tests/codegen/test_editors_api.py
new file mode 100644
index 00000000..fb8d3f56
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_editors_api.py
@@ -0,0 +1,59 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.editors_api import EditorsApi # noqa: E501
+
+
+class TestEditorsApi(unittest.TestCase):
+ """EditorsApi unit test stubs"""
+
+ def setUp(self):
+ self.api = EditorsApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_get_editor(self):
+ """Test case for get_editor
+
+ """
+ pass
+
+ def test_get_editor_annotations(self):
+ """Test case for get_editor_annotations
+
+ """
+ pass
+
+ def test_get_editor_editgroups(self):
+ """Test case for get_editor_editgroups
+
+ """
+ pass
+
+ def test_lookup_editor(self):
+ """Test case for lookup_editor
+
+ """
+ pass
+
+ def test_update_editor(self):
+ """Test case for update_editor
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_entity_edit.py b/python_openapi_client/tests/codegen/test_entity_edit.py
index 43cf8198..48c3f494 100644
--- a/python_openapi_client/tests/codegen/test_entity_edit.py
+++ b/python_openapi_client/tests/codegen/test_entity_edit.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.entity_edit import EntityEdit # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.entity_edit import EntityEdit
class TestEntityEdit(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestEntityEdit(unittest.TestCase):
def testEntityEdit(self):
"""Test EntityEdit"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.entity_edit.EntityEdit() # noqa: E501
+ # model = EntityEdit() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_entity_history_entry.py b/python_openapi_client/tests/codegen/test_entity_history_entry.py
index e707d1e1..a6d55eb5 100644
--- a/python_openapi_client/tests/codegen/test_entity_history_entry.py
+++ b/python_openapi_client/tests/codegen/test_entity_history_entry.py
@@ -1,23 +1,25 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.entity_history_entry import EntityHistoryEntry # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.changelog_entry import ChangelogEntry
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.entity_edit import EntityEdit
+globals()['ChangelogEntry'] = ChangelogEntry
+globals()['Editgroup'] = Editgroup
+globals()['EntityEdit'] = EntityEdit
+from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry
class TestEntityHistoryEntry(unittest.TestCase):
@@ -32,7 +34,7 @@ class TestEntityHistoryEntry(unittest.TestCase):
def testEntityHistoryEntry(self):
"""Test EntityHistoryEntry"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.entity_history_entry.EntityHistoryEntry() # noqa: E501
+ # model = EntityHistoryEntry() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_error_response.py b/python_openapi_client/tests/codegen/test_error_response.py
index 5ce74856..a2734184 100644
--- a/python_openapi_client/tests/codegen/test_error_response.py
+++ b/python_openapi_client/tests/codegen/test_error_response.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.error_response import ErrorResponse # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.error_response import ErrorResponse
class TestErrorResponse(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestErrorResponse(unittest.TestCase):
def testErrorResponse(self):
"""Test ErrorResponse"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.error_response.ErrorResponse() # noqa: E501
+ # model = ErrorResponse() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_file_auto_batch.py b/python_openapi_client/tests/codegen/test_file_auto_batch.py
index 0327c157..d7a49dd6 100644
--- a/python_openapi_client/tests/codegen/test_file_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_file_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.file_auto_batch import FileAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.file_entity import FileEntity
+globals()['Editgroup'] = Editgroup
+globals()['FileEntity'] = FileEntity
+from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch
class TestFileAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestFileAutoBatch(unittest.TestCase):
def testFileAutoBatch(self):
"""Test FileAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.file_auto_batch.FileAutoBatch() # noqa: E501
+ # model = FileAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_file_entity.py b/python_openapi_client/tests/codegen/test_file_entity.py
index beeb3871..61f0f444 100644
--- a/python_openapi_client/tests/codegen/test_file_entity.py
+++ b/python_openapi_client/tests/codegen/test_file_entity.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.file_entity import FileEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.file_url import FileUrl
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+globals()['FileUrl'] = FileUrl
+globals()['ReleaseEntity'] = ReleaseEntity
+from fatcat_openapi_client.model.file_entity import FileEntity
class TestFileEntity(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestFileEntity(unittest.TestCase):
def testFileEntity(self):
"""Test FileEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.file_entity.FileEntity() # noqa: E501
+ # model = FileEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_file_url.py b/python_openapi_client/tests/codegen/test_file_url.py
index 46e37e73..0450bf54 100644
--- a/python_openapi_client/tests/codegen/test_file_url.py
+++ b/python_openapi_client/tests/codegen/test_file_url.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.file_url import FileUrl # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.file_url import FileUrl
class TestFileUrl(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestFileUrl(unittest.TestCase):
def testFileUrl(self):
"""Test FileUrl"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.file_url.FileUrl() # noqa: E501
+ # model = FileUrl() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_files_api.py b/python_openapi_client/tests/codegen/test_files_api.py
new file mode 100644
index 00000000..592b5118
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_files_api.py
@@ -0,0 +1,95 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.files_api import FilesApi # noqa: E501
+
+
+class TestFilesApi(unittest.TestCase):
+ """FilesApi unit test stubs"""
+
+ def setUp(self):
+ self.api = FilesApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_file(self):
+ """Test case for create_file
+
+ """
+ pass
+
+ def test_create_file_auto_batch(self):
+ """Test case for create_file_auto_batch
+
+ """
+ pass
+
+ def test_delete_file(self):
+ """Test case for delete_file
+
+ """
+ pass
+
+ def test_delete_file_edit(self):
+ """Test case for delete_file_edit
+
+ """
+ pass
+
+ def test_get_file(self):
+ """Test case for get_file
+
+ """
+ pass
+
+ def test_get_file_edit(self):
+ """Test case for get_file_edit
+
+ """
+ pass
+
+ def test_get_file_history(self):
+ """Test case for get_file_history
+
+ """
+ pass
+
+ def test_get_file_redirects(self):
+ """Test case for get_file_redirects
+
+ """
+ pass
+
+ def test_get_file_revision(self):
+ """Test case for get_file_revision
+
+ """
+ pass
+
+ def test_lookup_file(self):
+ """Test case for lookup_file
+
+ """
+ pass
+
+ def test_update_file(self):
+ """Test case for update_file
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_fileset_auto_batch.py b/python_openapi_client/tests/codegen/test_fileset_auto_batch.py
index 57267b72..fa2883e0 100644
--- a/python_openapi_client/tests/codegen/test_fileset_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_fileset_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.fileset_auto_batch import FilesetAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+globals()['Editgroup'] = Editgroup
+globals()['FilesetEntity'] = FilesetEntity
+from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch
class TestFilesetAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestFilesetAutoBatch(unittest.TestCase):
def testFilesetAutoBatch(self):
"""Test FilesetAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.fileset_auto_batch.FilesetAutoBatch() # noqa: E501
+ # model = FilesetAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_fileset_entity.py b/python_openapi_client/tests/codegen/test_fileset_entity.py
index 6a097b52..1c4ac01a 100644
--- a/python_openapi_client/tests/codegen/test_fileset_entity.py
+++ b/python_openapi_client/tests/codegen/test_fileset_entity.py
@@ -1,23 +1,25 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.fileset_entity import FilesetEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.fileset_file import FilesetFile
+from fatcat_openapi_client.model.fileset_url import FilesetUrl
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+globals()['FilesetFile'] = FilesetFile
+globals()['FilesetUrl'] = FilesetUrl
+globals()['ReleaseEntity'] = ReleaseEntity
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
class TestFilesetEntity(unittest.TestCase):
@@ -32,7 +34,7 @@ class TestFilesetEntity(unittest.TestCase):
def testFilesetEntity(self):
"""Test FilesetEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.fileset_entity.FilesetEntity() # noqa: E501
+ # model = FilesetEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_fileset_file.py b/python_openapi_client/tests/codegen/test_fileset_file.py
index 73353d59..7cfa97e0 100644
--- a/python_openapi_client/tests/codegen/test_fileset_file.py
+++ b/python_openapi_client/tests/codegen/test_fileset_file.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.fileset_file import FilesetFile # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.fileset_file import FilesetFile
class TestFilesetFile(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestFilesetFile(unittest.TestCase):
def testFilesetFile(self):
"""Test FilesetFile"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.fileset_file.FilesetFile() # noqa: E501
+ # model = FilesetFile() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_fileset_url.py b/python_openapi_client/tests/codegen/test_fileset_url.py
index b159fbe9..ca4eaf5d 100644
--- a/python_openapi_client/tests/codegen/test_fileset_url.py
+++ b/python_openapi_client/tests/codegen/test_fileset_url.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.fileset_url import FilesetUrl # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.fileset_url import FilesetUrl
class TestFilesetUrl(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestFilesetUrl(unittest.TestCase):
def testFilesetUrl(self):
"""Test FilesetUrl"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.fileset_url.FilesetUrl() # noqa: E501
+ # model = FilesetUrl() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_filesets_api.py b/python_openapi_client/tests/codegen/test_filesets_api.py
new file mode 100644
index 00000000..116bd84b
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_filesets_api.py
@@ -0,0 +1,89 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.filesets_api import FilesetsApi # noqa: E501
+
+
+class TestFilesetsApi(unittest.TestCase):
+ """FilesetsApi unit test stubs"""
+
+ def setUp(self):
+ self.api = FilesetsApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_fileset(self):
+ """Test case for create_fileset
+
+ """
+ pass
+
+ def test_create_fileset_auto_batch(self):
+ """Test case for create_fileset_auto_batch
+
+ """
+ pass
+
+ def test_delete_fileset(self):
+ """Test case for delete_fileset
+
+ """
+ pass
+
+ def test_delete_fileset_edit(self):
+ """Test case for delete_fileset_edit
+
+ """
+ pass
+
+ def test_get_fileset(self):
+ """Test case for get_fileset
+
+ """
+ pass
+
+ def test_get_fileset_edit(self):
+ """Test case for get_fileset_edit
+
+ """
+ pass
+
+ def test_get_fileset_history(self):
+ """Test case for get_fileset_history
+
+ """
+ pass
+
+ def test_get_fileset_redirects(self):
+ """Test case for get_fileset_redirects
+
+ """
+ pass
+
+ def test_get_fileset_revision(self):
+ """Test case for get_fileset_revision
+
+ """
+ pass
+
+ def test_update_fileset(self):
+ """Test case for update_fileset
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_release_abstract.py b/python_openapi_client/tests/codegen/test_release_abstract.py
index 207c1352..8f5fa599 100644
--- a/python_openapi_client/tests/codegen/test_release_abstract.py
+++ b/python_openapi_client/tests/codegen/test_release_abstract.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_abstract import ReleaseAbstract # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.release_abstract import ReleaseAbstract
class TestReleaseAbstract(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestReleaseAbstract(unittest.TestCase):
def testReleaseAbstract(self):
"""Test ReleaseAbstract"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_abstract.ReleaseAbstract() # noqa: E501
+ # model = ReleaseAbstract() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_release_auto_batch.py b/python_openapi_client/tests/codegen/test_release_auto_batch.py
index fdac201e..fd20d2ed 100644
--- a/python_openapi_client/tests/codegen/test_release_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_release_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_auto_batch import ReleaseAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+globals()['Editgroup'] = Editgroup
+globals()['ReleaseEntity'] = ReleaseEntity
+from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch
class TestReleaseAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestReleaseAutoBatch(unittest.TestCase):
def testReleaseAutoBatch(self):
"""Test ReleaseAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_auto_batch.ReleaseAutoBatch() # noqa: E501
+ # model = ReleaseAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_release_contrib.py b/python_openapi_client/tests/codegen/test_release_contrib.py
index d05676d1..700141fb 100644
--- a/python_openapi_client/tests/codegen/test_release_contrib.py
+++ b/python_openapi_client/tests/codegen/test_release_contrib.py
@@ -1,23 +1,21 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_contrib import ReleaseContrib # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.creator_entity import CreatorEntity
+globals()['CreatorEntity'] = CreatorEntity
+from fatcat_openapi_client.model.release_contrib import ReleaseContrib
class TestReleaseContrib(unittest.TestCase):
@@ -32,7 +30,7 @@ class TestReleaseContrib(unittest.TestCase):
def testReleaseContrib(self):
"""Test ReleaseContrib"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_contrib.ReleaseContrib() # noqa: E501
+ # model = ReleaseContrib() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_release_entity.py b/python_openapi_client/tests/codegen/test_release_entity.py
index 5f9a90f5..00ebc496 100644
--- a/python_openapi_client/tests/codegen/test_release_entity.py
+++ b/python_openapi_client/tests/codegen/test_release_entity.py
@@ -1,23 +1,35 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_entity import ReleaseEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.container_entity import ContainerEntity
+from fatcat_openapi_client.model.file_entity import FileEntity
+from fatcat_openapi_client.model.fileset_entity import FilesetEntity
+from fatcat_openapi_client.model.release_abstract import ReleaseAbstract
+from fatcat_openapi_client.model.release_contrib import ReleaseContrib
+from fatcat_openapi_client.model.release_ext_ids import ReleaseExtIds
+from fatcat_openapi_client.model.release_ref import ReleaseRef
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+globals()['ContainerEntity'] = ContainerEntity
+globals()['FileEntity'] = FileEntity
+globals()['FilesetEntity'] = FilesetEntity
+globals()['ReleaseAbstract'] = ReleaseAbstract
+globals()['ReleaseContrib'] = ReleaseContrib
+globals()['ReleaseExtIds'] = ReleaseExtIds
+globals()['ReleaseRef'] = ReleaseRef
+globals()['WebcaptureEntity'] = WebcaptureEntity
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
class TestReleaseEntity(unittest.TestCase):
@@ -32,7 +44,7 @@ class TestReleaseEntity(unittest.TestCase):
def testReleaseEntity(self):
"""Test ReleaseEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_entity.ReleaseEntity() # noqa: E501
+ # model = ReleaseEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_release_ext_ids.py b/python_openapi_client/tests/codegen/test_release_ext_ids.py
index f79d03bc..e8488510 100644
--- a/python_openapi_client/tests/codegen/test_release_ext_ids.py
+++ b/python_openapi_client/tests/codegen/test_release_ext_ids.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_ext_ids import ReleaseExtIds # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.release_ext_ids import ReleaseExtIds
class TestReleaseExtIds(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestReleaseExtIds(unittest.TestCase):
def testReleaseExtIds(self):
"""Test ReleaseExtIds"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_ext_ids.ReleaseExtIds() # noqa: E501
+ # model = ReleaseExtIds() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_release_ref.py b/python_openapi_client/tests/codegen/test_release_ref.py
index 4737a66b..d3803af0 100644
--- a/python_openapi_client/tests/codegen/test_release_ref.py
+++ b/python_openapi_client/tests/codegen/test_release_ref.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.release_ref import ReleaseRef # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.release_ref import ReleaseRef
class TestReleaseRef(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestReleaseRef(unittest.TestCase):
def testReleaseRef(self):
"""Test ReleaseRef"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.release_ref.ReleaseRef() # noqa: E501
+ # model = ReleaseRef() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_releases_api.py b/python_openapi_client/tests/codegen/test_releases_api.py
new file mode 100644
index 00000000..5f61f38f
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_releases_api.py
@@ -0,0 +1,113 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.releases_api import ReleasesApi # noqa: E501
+
+
+class TestReleasesApi(unittest.TestCase):
+ """ReleasesApi unit test stubs"""
+
+ def setUp(self):
+ self.api = ReleasesApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_release(self):
+ """Test case for create_release
+
+ """
+ pass
+
+ def test_create_release_auto_batch(self):
+ """Test case for create_release_auto_batch
+
+ """
+ pass
+
+ def test_delete_release(self):
+ """Test case for delete_release
+
+ """
+ pass
+
+ def test_delete_release_edit(self):
+ """Test case for delete_release_edit
+
+ """
+ pass
+
+ def test_get_release(self):
+ """Test case for get_release
+
+ """
+ pass
+
+ def test_get_release_edit(self):
+ """Test case for get_release_edit
+
+ """
+ pass
+
+ def test_get_release_files(self):
+ """Test case for get_release_files
+
+ """
+ pass
+
+ def test_get_release_filesets(self):
+ """Test case for get_release_filesets
+
+ """
+ pass
+
+ def test_get_release_history(self):
+ """Test case for get_release_history
+
+ """
+ pass
+
+ def test_get_release_redirects(self):
+ """Test case for get_release_redirects
+
+ """
+ pass
+
+ def test_get_release_revision(self):
+ """Test case for get_release_revision
+
+ """
+ pass
+
+ def test_get_release_webcaptures(self):
+ """Test case for get_release_webcaptures
+
+ """
+ pass
+
+ def test_lookup_release(self):
+ """Test case for lookup_release
+
+ """
+ pass
+
+ def test_update_release(self):
+ """Test case for update_release
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_success.py b/python_openapi_client/tests/codegen/test_success.py
index 11ca8cc0..8ba649af 100644
--- a/python_openapi_client/tests/codegen/test_success.py
+++ b/python_openapi_client/tests/codegen/test_success.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.success import Success # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.success import Success
class TestSuccess(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestSuccess(unittest.TestCase):
def testSuccess(self):
"""Test Success"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.success.Success() # noqa: E501
+ # model = Success() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_webcapture_auto_batch.py b/python_openapi_client/tests/codegen/test_webcapture_auto_batch.py
index bf79de31..e09b8097 100644
--- a/python_openapi_client/tests/codegen/test_webcapture_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_webcapture_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.webcapture_auto_batch import WebcaptureAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
+globals()['Editgroup'] = Editgroup
+globals()['WebcaptureEntity'] = WebcaptureEntity
+from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch
class TestWebcaptureAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestWebcaptureAutoBatch(unittest.TestCase):
def testWebcaptureAutoBatch(self):
"""Test WebcaptureAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.webcapture_auto_batch.WebcaptureAutoBatch() # noqa: E501
+ # model = WebcaptureAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_webcapture_cdx_line.py b/python_openapi_client/tests/codegen/test_webcapture_cdx_line.py
index 91626e9d..6b27c4b0 100644
--- a/python_openapi_client/tests/codegen/test_webcapture_cdx_line.py
+++ b/python_openapi_client/tests/codegen/test_webcapture_cdx_line.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.webcapture_cdx_line import WebcaptureCdxLine # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.webcapture_cdx_line import WebcaptureCdxLine
class TestWebcaptureCdxLine(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestWebcaptureCdxLine(unittest.TestCase):
def testWebcaptureCdxLine(self):
"""Test WebcaptureCdxLine"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.webcapture_cdx_line.WebcaptureCdxLine() # noqa: E501
+ # model = WebcaptureCdxLine() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_webcapture_entity.py b/python_openapi_client/tests/codegen/test_webcapture_entity.py
index f3bdc98c..703288e4 100644
--- a/python_openapi_client/tests/codegen/test_webcapture_entity.py
+++ b/python_openapi_client/tests/codegen/test_webcapture_entity.py
@@ -1,23 +1,25 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.release_entity import ReleaseEntity
+from fatcat_openapi_client.model.webcapture_cdx_line import WebcaptureCdxLine
+from fatcat_openapi_client.model.webcapture_url import WebcaptureUrl
+globals()['ReleaseEntity'] = ReleaseEntity
+globals()['WebcaptureCdxLine'] = WebcaptureCdxLine
+globals()['WebcaptureUrl'] = WebcaptureUrl
+from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity
class TestWebcaptureEntity(unittest.TestCase):
@@ -32,7 +34,7 @@ class TestWebcaptureEntity(unittest.TestCase):
def testWebcaptureEntity(self):
"""Test WebcaptureEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.webcapture_entity.WebcaptureEntity() # noqa: E501
+ # model = WebcaptureEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_webcapture_url.py b/python_openapi_client/tests/codegen/test_webcapture_url.py
index 96c50ce1..18c45fb7 100644
--- a/python_openapi_client/tests/codegen/test_webcapture_url.py
+++ b/python_openapi_client/tests/codegen/test_webcapture_url.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.webcapture_url import WebcaptureUrl # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.webcapture_url import WebcaptureUrl
class TestWebcaptureUrl(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestWebcaptureUrl(unittest.TestCase):
def testWebcaptureUrl(self):
"""Test WebcaptureUrl"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.webcapture_url.WebcaptureUrl() # noqa: E501
+ # model = WebcaptureUrl() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_webcaptures_api.py b/python_openapi_client/tests/codegen/test_webcaptures_api.py
new file mode 100644
index 00000000..0b2fd6b7
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_webcaptures_api.py
@@ -0,0 +1,89 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.webcaptures_api import WebcapturesApi # noqa: E501
+
+
+class TestWebcapturesApi(unittest.TestCase):
+ """WebcapturesApi unit test stubs"""
+
+ def setUp(self):
+ self.api = WebcapturesApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_webcapture(self):
+ """Test case for create_webcapture
+
+ """
+ pass
+
+ def test_create_webcapture_auto_batch(self):
+ """Test case for create_webcapture_auto_batch
+
+ """
+ pass
+
+ def test_delete_webcapture(self):
+ """Test case for delete_webcapture
+
+ """
+ pass
+
+ def test_delete_webcapture_edit(self):
+ """Test case for delete_webcapture_edit
+
+ """
+ pass
+
+ def test_get_webcapture(self):
+ """Test case for get_webcapture
+
+ """
+ pass
+
+ def test_get_webcapture_edit(self):
+ """Test case for get_webcapture_edit
+
+ """
+ pass
+
+ def test_get_webcapture_history(self):
+ """Test case for get_webcapture_history
+
+ """
+ pass
+
+ def test_get_webcapture_redirects(self):
+ """Test case for get_webcapture_redirects
+
+ """
+ pass
+
+ def test_get_webcapture_revision(self):
+ """Test case for get_webcapture_revision
+
+ """
+ pass
+
+ def test_update_webcapture(self):
+ """Test case for update_webcapture
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python_openapi_client/tests/codegen/test_work_auto_batch.py b/python_openapi_client/tests/codegen/test_work_auto_batch.py
index 7d0bbf12..1b1bc485 100644
--- a/python_openapi_client/tests/codegen/test_work_auto_batch.py
+++ b/python_openapi_client/tests/codegen/test_work_auto_batch.py
@@ -1,23 +1,23 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.work_auto_batch import WorkAutoBatch # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.editgroup import Editgroup
+from fatcat_openapi_client.model.work_entity import WorkEntity
+globals()['Editgroup'] = Editgroup
+globals()['WorkEntity'] = WorkEntity
+from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch
class TestWorkAutoBatch(unittest.TestCase):
@@ -32,7 +32,7 @@ class TestWorkAutoBatch(unittest.TestCase):
def testWorkAutoBatch(self):
"""Test WorkAutoBatch"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.work_auto_batch.WorkAutoBatch() # noqa: E501
+ # model = WorkAutoBatch() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_work_entity.py b/python_openapi_client/tests/codegen/test_work_entity.py
index ccabb55f..2d6ef8b2 100644
--- a/python_openapi_client/tests/codegen/test_work_entity.py
+++ b/python_openapi_client/tests/codegen/test_work_entity.py
@@ -1,23 +1,19 @@
-# coding: utf-8
-
"""
fatcat
Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
- The version of the OpenAPI document: 0.3.1
+ The version of the OpenAPI document: 0.5.0
Contact: webservices@archive.org
Generated by: https://openapi-generator.tech
"""
-from __future__ import absolute_import
-
+import sys
import unittest
import fatcat_openapi_client
-from fatcat_openapi_client.models.work_entity import WorkEntity # noqa: E501
-from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client.model.work_entity import WorkEntity
class TestWorkEntity(unittest.TestCase):
@@ -32,7 +28,7 @@ class TestWorkEntity(unittest.TestCase):
def testWorkEntity(self):
"""Test WorkEntity"""
# FIXME: construct object with mandatory attributes with example values
- # model = fatcat_openapi_client.models.work_entity.WorkEntity() # noqa: E501
+ # model = WorkEntity() # noqa: E501
pass
diff --git a/python_openapi_client/tests/codegen/test_works_api.py b/python_openapi_client/tests/codegen/test_works_api.py
new file mode 100644
index 00000000..c2096bc5
--- /dev/null
+++ b/python_openapi_client/tests/codegen/test_works_api.py
@@ -0,0 +1,95 @@
+"""
+ fatcat
+
+ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501
+
+ The version of the OpenAPI document: 0.5.0
+ Contact: webservices@archive.org
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import unittest
+
+import fatcat_openapi_client
+from fatcat_openapi_client.api.works_api import WorksApi # noqa: E501
+
+
+class TestWorksApi(unittest.TestCase):
+ """WorksApi unit test stubs"""
+
+ def setUp(self):
+ self.api = WorksApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_work(self):
+ """Test case for create_work
+
+ """
+ pass
+
+ def test_create_work_auto_batch(self):
+ """Test case for create_work_auto_batch
+
+ """
+ pass
+
+ def test_delete_work(self):
+ """Test case for delete_work
+
+ """
+ pass
+
+ def test_delete_work_edit(self):
+ """Test case for delete_work_edit
+
+ """
+ pass
+
+ def test_get_work(self):
+ """Test case for get_work
+
+ """
+ pass
+
+ def test_get_work_edit(self):
+ """Test case for get_work_edit
+
+ """
+ pass
+
+ def test_get_work_history(self):
+ """Test case for get_work_history
+
+ """
+ pass
+
+ def test_get_work_redirects(self):
+ """Test case for get_work_redirects
+
+ """
+ pass
+
+ def test_get_work_releases(self):
+ """Test case for get_work_releases
+
+ """
+ pass
+
+ def test_get_work_revision(self):
+ """Test case for get_work_revision
+
+ """
+ pass
+
+ def test_update_work(self):
+ """Test case for update_work
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()