From 02daeaf2652383985bc4d31170d8180f58ce1b18 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 18 Sep 2019 23:37:17 -0700 Subject: python codegen with new openapi-generator tool --- .../fatcat_openapi_client/__init__.py | 12 +- .../fatcat_openapi_client/api/default_api.py | 7855 +++++++++++--------- .../fatcat_openapi_client/api_client.py | 105 +- .../fatcat_openapi_client/configuration.py | 197 +- .../fatcat_openapi_client/exceptions.py | 121 + .../fatcat_openapi_client/models/__init__.py | 4 +- .../fatcat_openapi_client/models/auth_oidc.py | 15 +- .../models/auth_oidc_result.py | 17 +- .../models/auth_token_result.py | 15 +- .../models/changelog_entry.py | 17 +- .../models/container_auto_batch.py | 18 +- .../models/container_entity.py | 401 +- .../models/creator_auto_batch.py | 18 +- .../fatcat_openapi_client/models/creator_entity.py | 335 +- .../fatcat_openapi_client/models/editgroup.py | 35 +- .../models/editgroup_annotation.py | 37 +- .../models/editgroup_edits.py | 17 +- .../fatcat_openapi_client/models/editor.py | 19 +- .../fatcat_openapi_client/models/entity_edit.py | 45 +- .../models/entity_history_entry.py | 19 +- .../fatcat_openapi_client/models/error_response.py | 15 +- .../models/file_auto_batch.py | 18 +- .../fatcat_openapi_client/models/file_entity.py | 563 +- .../fatcat_openapi_client/models/file_url.py | 15 +- .../models/fileset_auto_batch.py | 18 +- .../fatcat_openapi_client/models/fileset_entity.py | 262 +- .../fatcat_openapi_client/models/fileset_file.py | 33 +- .../fatcat_openapi_client/models/fileset_url.py | 15 +- .../models/release_abstract.py | 19 +- .../models/release_auto_batch.py | 18 +- .../models/release_contrib.py | 29 +- .../fatcat_openapi_client/models/release_entity.py | 1172 ++- .../models/release_ext_ids.py | 15 +- .../fatcat_openapi_client/models/release_ref.py | 25 +- .../fatcat_openapi_client/models/success.py | 15 +- .../models/webcapture_auto_batch.py | 18 +- .../models/webcapture_cdx_line.py | 23 +- .../models/webcapture_entity.py | 468 +- .../fatcat_openapi_client/models/webcapture_url.py | 15 +- .../models/work_auto_batch.py | 18 +- .../fatcat_openapi_client/models/work_entity.py | 237 +- .../fatcat_openapi_client/rest.py | 46 +- 42 files changed, 6745 insertions(+), 5614 deletions(-) create mode 100644 python_openapi_client/fatcat_openapi_client/exceptions.py (limited to 'python_openapi_client/fatcat_openapi_client') diff --git a/python_openapi_client/fatcat_openapi_client/__init__.py b/python_openapi_client/fatcat_openapi_client/__init__.py index 64cf32a8..82ea68f7 100644 --- a/python_openapi_client/fatcat_openapi_client/__init__.py +++ b/python_openapi_client/fatcat_openapi_client/__init__.py @@ -7,20 +7,27 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +__version__ = "0.3.1" + # import apis into sdk package from fatcat_openapi_client.api.default_api import DefaultApi # import ApiClient from fatcat_openapi_client.api_client import ApiClient from fatcat_openapi_client.configuration import Configuration +from fatcat_openapi_client.exceptions import OpenApiException +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 @@ -57,3 +64,4 @@ 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/default_api.py b/python_openapi_client/fatcat_openapi_client/api/default_api.py index cfa485ec..bb6ffbac 100644 --- a/python_openapi_client/fatcat_openapi_client/api/default_api.py +++ b/python_openapi_client/fatcat_openapi_client/api/default_api.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import re # noqa: F401 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 the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -38,72 +42,85 @@ class DefaultApi(object): 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=True - >>> thread = api.accept_editgroup(editgroup_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.accept_editgroup(editgroup_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.accept_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501 - else: - (data) = self.accept_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.accept_editgroup_with_http_info(editgroup_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: base32-encoded unique identifier (required) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method accept_editgroup" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `accept_editgroup`") # noqa: E501 - - if ('editgroup_id' in params and - len(params['editgroup_id']) > 26): - raise ValueError("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 params and - len(params['editgroup_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editgroup_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editgroup_id` when calling `accept_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -117,10 +134,6 @@ class DefaultApi(object): 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 @@ -134,10 +147,10 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -145,62 +158,75 @@ class DefaultApi(object): 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=True - >>> thread = api.auth_check(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_check(async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.auth_check_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.auth_check_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.auth_check_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_check_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param str role: - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method auth_check" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'role' in params: - query_params.append(('role', params['role'])) # noqa: E501 + if 'role' in local_var_params: + query_params.append(('role', local_var_params['role'])) # noqa: E501 header_params = {} @@ -212,10 +238,6 @@ class DefaultApi(object): 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 @@ -229,10 +251,10 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -240,58 +262,71 @@ class DefaultApi(object): 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=True - >>> thread = api.auth_oidc(oidc_params, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auth_oidc(oidc_params, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.auth_oidc_with_http_info(oidc_params, **kwargs) # noqa: E501 - else: - (data) = self.auth_oidc_with_http_info(oidc_params, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.auth_oidc_with_http_info(oidc_params, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param AuthOidc oidc_params: (required) - :return: AuthOidcResult + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method auth_oidc" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'oidc_params' is set - if ('oidc_params' not in params or - params['oidc_params'] is None): - raise ValueError("Missing the required parameter `oidc_params` when calling `auth_oidc`") # noqa: E501 + 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 = {} @@ -305,8 +340,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'oidc_params' in params: - body_params = params['oidc_params'] + 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 @@ -328,10 +363,10 @@ class DefaultApi(object): files=local_var_files, response_type='AuthOidcResult', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -339,70 +374,83 @@ class DefaultApi(object): 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=True - >>> thread = api.create_auth_token(editor_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_auth_token(editor_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_auth_token_with_http_info(editor_id, **kwargs) # noqa: E501 - else: - (data) = self.create_auth_token_with_http_info(editor_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_auth_token_with_http_info(editor_id, async=True) + 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 bool + :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) - :return: AuthTokenResult + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_auth_token" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editor_id' is set - if ('editor_id' not in params or - params['editor_id'] is None): - raise ValueError("Missing the required parameter `editor_id` when calling `create_auth_token`") # noqa: E501 + 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 params: - path_params['editor_id'] = params['editor_id'] # noqa: E501 + if 'editor_id' in local_var_params: + path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501 query_params = [] - if 'duration_seconds' in params: - query_params.append(('duration_seconds', params['duration_seconds'])) # noqa: E501 + if 'duration_seconds' in local_var_params: + query_params.append(('duration_seconds', local_var_params['duration_seconds'])) # noqa: E501 header_params = {} @@ -414,10 +462,6 @@ class DefaultApi(object): 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 @@ -431,10 +475,10 @@ class DefaultApi(object): files=local_var_files, response_type='AuthTokenResult', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -442,70 +486,83 @@ class DefaultApi(object): 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 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=True - >>> thread = api.create_container(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_container(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_container_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_container_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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 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=True - >>> thread = api.create_container_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param ContainerEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_container" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_container`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_container`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -515,8 +572,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -538,10 +595,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -549,58 +606,71 @@ class DefaultApi(object): 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=True - >>> thread = api.create_container_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_container_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_container_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_container_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_container_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param ContainerAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_container_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_container_auto_batch`") # noqa: E501 + 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 = {} @@ -614,8 +684,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -637,79 +707,92 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_creator(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_creator(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_creator_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_creator_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_creator_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param CreatorEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_creator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_creator`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_creator`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -719,8 +802,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -742,67 +825,80 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_creator_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_creator_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_creator_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_creator_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_creator_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param CreatorAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_creator_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_creator_auto_batch`") # noqa: E501 + 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 = {} @@ -816,8 +912,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -839,10 +935,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -850,58 +946,71 @@ class DefaultApi(object): 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=True - >>> thread = api.create_editgroup(editgroup, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_editgroup(editgroup, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_editgroup_with_http_info(editgroup, **kwargs) # noqa: E501 - else: - (data) = self.create_editgroup_with_http_info(editgroup, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_editgroup_with_http_info(editgroup, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_editgroup_with_http_info(editgroup, async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param Editgroup editgroup: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_editgroup" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup' is set - if ('editgroup' not in params or - params['editgroup'] is None): - raise ValueError("Missing the required parameter `editgroup` when calling `create_editgroup`") # noqa: E501 + 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 = {} @@ -915,8 +1024,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'editgroup' in params: - body_params = params['editgroup'] + 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 @@ -938,10 +1047,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -949,78 +1058,91 @@ class DefaultApi(object): 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=True - >>> thread = api.create_editgroup_annotation(editgroup_id, annotation, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_editgroup_annotation(editgroup_id, annotation, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_editgroup_annotation_with_http_info(editgroup_id, annotation, **kwargs) # noqa: E501 - else: - (data) = self.create_editgroup_annotation_with_http_info(editgroup_id, annotation, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_editgroup_annotation_with_http_info(editgroup_id, annotation, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: base32-encoded unique identifier (required) :param EditgroupAnnotation annotation: (required) - :return: EditgroupAnnotation + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_editgroup_annotation" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_editgroup_annotation`") # noqa: E501 + 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 params or - params['annotation'] is None): - raise ValueError("Missing the required parameter `annotation` when calling `create_editgroup_annotation`") # noqa: E501 - - if ('editgroup_id' in params and - len(params['editgroup_id']) > 26): - raise ValueError("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 params and - len(params['editgroup_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editgroup_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editgroup_id` when calling `create_editgroup_annotation`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1030,8 +1152,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'annotation' in params: - body_params = params['annotation'] + 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 @@ -1053,79 +1175,92 @@ class DefaultApi(object): files=local_var_files, response_type='EditgroupAnnotation', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_file(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_file(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_file_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_file_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_file_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param FileEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_file`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_file`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1135,8 +1270,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -1158,67 +1293,80 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_file_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_file_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_file_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_file_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_file_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param FileAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_file_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_file_auto_batch`") # noqa: E501 + 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 = {} @@ -1232,8 +1380,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -1255,79 +1403,92 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_fileset(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_fileset(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_fileset_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_fileset_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_fileset_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param FilesetEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_fileset" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_fileset`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_fileset`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1337,8 +1498,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -1360,67 +1521,80 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_fileset_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_fileset_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_fileset_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_fileset_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_fileset_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param FilesetAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_fileset_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_fileset_auto_batch`") # noqa: E501 + 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 = {} @@ -1434,8 +1608,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -1457,10 +1631,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -1468,70 +1642,83 @@ class DefaultApi(object): 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=True - >>> thread = api.create_release(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_release(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_release_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_release_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_release_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param ReleaseEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_release" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_release`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_release`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1541,8 +1728,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -1564,10 +1751,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -1575,58 +1762,71 @@ class DefaultApi(object): 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=True - >>> thread = api.create_release_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_release_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_release_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_release_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_release_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param ReleaseAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_release_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_release_auto_batch`") # noqa: E501 + 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 = {} @@ -1640,8 +1840,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -1663,79 +1863,92 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_webcapture(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webcapture(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_webcapture_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_webcapture_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_webcapture_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param WebcaptureEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_webcapture" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_webcapture`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_webcapture`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1745,8 +1958,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -1768,67 +1981,80 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_webcapture_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webcapture_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_webcapture_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_webcapture_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_webcapture_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param WebcaptureAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_webcapture_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_webcapture_auto_batch`") # noqa: E501 + 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 = {} @@ -1842,8 +2068,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -1865,79 +2091,92 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_work(editgroup_id, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_work(editgroup_id, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_work_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - else: - (data) = self.create_work_with_http_info(editgroup_id, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_work_with_http_info(editgroup_id, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param WorkEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_work" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `create_work`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `create_work`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -1947,8 +2186,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -1970,67 +2209,80 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.create_work_auto_batch(auto_batch, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_work_auto_batch(auto_batch, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.create_work_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - else: - (data) = self.create_work_auto_batch_with_http_info(auto_batch, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.create_work_auto_batch_with_http_info(auto_batch, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param WorkAutoBatch auto_batch: (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method create_work_auto_batch" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'auto_batch' is set - if ('auto_batch' not in params or - params['auto_batch'] is None): - raise ValueError("Missing the required parameter `auto_batch` when calling `create_work_auto_batch`") # noqa: E501 + 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 = {} @@ -2044,8 +2296,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'auto_batch' in params: - body_params = params['auto_batch'] + 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 @@ -2067,10 +2319,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -2078,72 +2330,85 @@ class DefaultApi(object): 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=True - >>> thread = api.delete_container(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_container(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_container_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_container_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_container_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_container" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_container`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_container`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -2157,10 +2422,6 @@ class DefaultApi(object): 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 @@ -2174,10 +2435,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -2185,80 +2446,93 @@ class DefaultApi(object): 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=True - >>> thread = api.delete_container_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_container_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_container_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_container_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_container_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_container_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_container_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -2272,10 +2546,6 @@ class DefaultApi(object): 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 @@ -2289,81 +2559,94 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_creator(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_creator(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_creator_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_creator_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_creator_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_creator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_creator`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_creator`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -2377,10 +2660,6 @@ class DefaultApi(object): 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 @@ -2394,89 +2673,102 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_creator_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_creator_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_creator_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_creator_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_creator_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_creator_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_creator_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -2490,10 +2782,6 @@ class DefaultApi(object): 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 @@ -2507,81 +2795,94 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_file(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_file(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_file_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_file_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_file_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_file`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_file`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -2595,10 +2896,6 @@ class DefaultApi(object): 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 @@ -2612,89 +2909,102 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_file_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_file_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_file_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_file_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_file_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_file_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_file_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -2708,10 +3018,6 @@ class DefaultApi(object): 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 @@ -2725,81 +3031,94 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_fileset(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_fileset(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_fileset_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_fileset_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_fileset_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_fileset" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_fileset`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_fileset`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -2813,10 +3132,6 @@ class DefaultApi(object): 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 @@ -2830,89 +3145,102 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_fileset_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_fileset_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_fileset_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_fileset_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_fileset_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_fileset_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_fileset_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -2926,10 +3254,6 @@ class DefaultApi(object): 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 @@ -2943,10 +3267,10 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -2954,72 +3278,85 @@ class DefaultApi(object): 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=True - >>> thread = api.delete_release(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_release(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_release_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_release_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_release_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_release" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_release`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_release`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -3033,10 +3370,6 @@ class DefaultApi(object): 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 @@ -3050,10 +3383,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -3061,80 +3394,93 @@ class DefaultApi(object): 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=True - >>> thread = api.delete_release_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_release_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_release_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_release_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_release_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_release_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_release_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -3148,10 +3494,6 @@ class DefaultApi(object): 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 @@ -3165,81 +3507,94 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_webcapture(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_webcapture(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_webcapture_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_webcapture_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_webcapture_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_webcapture" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_webcapture`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_webcapture`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -3253,10 +3608,6 @@ class DefaultApi(object): 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 @@ -3270,89 +3621,102 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_webcapture_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_webcapture_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_webcapture_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_webcapture_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_webcapture_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_webcapture_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_webcapture_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -3366,10 +3730,6 @@ class DefaultApi(object): 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 @@ -3383,81 +3743,94 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_work(editgroup_id, ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_work(editgroup_id, ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.delete_work_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - else: - (data) = self.delete_work_with_http_info(editgroup_id, ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_work_with_http_info(editgroup_id, ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_work" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_work`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `delete_work`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -3471,10 +3844,6 @@ class DefaultApi(object): 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 @@ -3488,89 +3857,102 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.delete_work_edit(editgroup_id, edit_id, async=True) + 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 bool + :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 - if kwargs.get('async'): - return self.delete_work_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_work_edit_with_http_info(editgroup_id, edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.delete_work_edit_with_http_info(editgroup_id, edit_id, async=True) + 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 bool + :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) - :return: Success + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_work_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `delete_work_edit`") # noqa: E501 + 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 params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `delete_work_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'edit_id' in params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + 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 = [] @@ -3584,10 +3966,6 @@ class DefaultApi(object): 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 @@ -3601,10 +3979,10 @@ class DefaultApi(object): files=local_var_files, response_type='Success', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -3612,62 +3990,75 @@ class DefaultApi(object): 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=True - >>> thread = api.get_changelog(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_changelog(async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_changelog_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_changelog_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_changelog_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_changelog_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param int limit: Maximum count of changelog entries to return in response - :return: list[ChangelogEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_changelog" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -3679,10 +4070,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -3696,10 +4083,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[ChangelogEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -3707,64 +4094,77 @@ class DefaultApi(object): 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=True - >>> thread = api.get_changelog_entry(index, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_changelog_entry(index, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_changelog_entry_with_http_info(index, **kwargs) # noqa: E501 - else: - (data) = self.get_changelog_entry_with_http_info(index, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_changelog_entry_with_http_info(index, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param int index: Changelog index of entry to return (required) - :return: ChangelogEntry + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_changelog_entry" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `get_changelog_entry`") # noqa: E501 + 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 params: - path_params['index'] = params['index'] # noqa: E501 + if 'index' in local_var_params: + path_params['index'] = local_var_params['index'] # noqa: E501 query_params = [] @@ -3778,10 +4178,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -3795,10 +4191,10 @@ class DefaultApi(object): files=local_var_files, response_type='ChangelogEntry', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -3806,74 +4202,87 @@ class DefaultApi(object): 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=True - >>> thread = api.get_container(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_container_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_container_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_container_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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). - :return: ContainerEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_container" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_container`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -3885,10 +4294,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -3902,10 +4307,10 @@ class DefaultApi(object): files=local_var_files, response_type='ContainerEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -3913,72 +4318,85 @@ class DefaultApi(object): 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=True - >>> thread = api.get_container_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_container_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_container_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_container_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_container_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_container_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -3992,10 +4410,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4009,10 +4423,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -4020,70 +4434,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_container_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_container_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_container_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_container_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: Maximum number of changelog entries to return - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_container_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_container_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -4095,10 +4522,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4112,10 +4535,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -4123,64 +4546,77 @@ class DefaultApi(object): 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=True - >>> thread = api.get_container_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_container_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_container_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_container_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_container_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_container_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -4194,10 +4630,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4211,10 +4643,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -4222,82 +4654,95 @@ class DefaultApi(object): 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=True - >>> thread = api.get_container_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_container_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_container_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_container_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_container_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: ContainerEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_container_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_container_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -4309,10 +4754,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4326,83 +4767,96 @@ class DefaultApi(object): files=local_var_files, response_type='ContainerEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_creator(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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). - :return: CreatorEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_creator`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -4414,10 +4868,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4431,81 +4881,94 @@ class DefaultApi(object): files=local_var_files, response_type='CreatorEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_creator_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_creator_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -4519,10 +4982,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4536,79 +4995,92 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_creator_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_creator_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -4620,10 +5092,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4637,73 +5105,86 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_creator_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_creator_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -4717,10 +5198,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4734,10 +5211,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -4745,70 +5222,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_creator_releases(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_releases(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_releases_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_releases_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_releases_with_http_info(ident, async=True) + 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 bool + :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`. - :return: list[ReleaseEntity] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator_releases" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_creator_releases`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'hide' in local_var_params: + query_params.append(('hide', local_var_params['hide'])) # noqa: E501 header_params = {} @@ -4820,10 +5310,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4837,91 +5323,104 @@ class DefaultApi(object): files=local_var_files, response_type='list[ReleaseEntity]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_creator_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_creator_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_creator_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_creator_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_creator_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: CreatorEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_creator_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_creator_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -4933,10 +5432,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -4950,10 +5445,10 @@ class DefaultApi(object): files=local_var_files, response_type='CreatorEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -4961,72 +5456,85 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editgroup(editgroup_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editgroup(editgroup_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501 - else: - (data) = self.get_editgroup_with_http_info(editgroup_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editgroup_with_http_info(editgroup_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: base32-encoded unique identifier (required) - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editgroup" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `get_editgroup`") # noqa: E501 - - if ('editgroup_id' in params and - len(params['editgroup_id']) > 26): - raise ValueError("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 params and - len(params['editgroup_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editgroup_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] @@ -5040,10 +5548,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5057,10 +5561,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -5068,78 +5572,91 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editgroup_annotations(editgroup_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editgroup_annotations(editgroup_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editgroup_annotations_with_http_info(editgroup_id, **kwargs) # noqa: E501 - else: - (data) = self.get_editgroup_annotations_with_http_info(editgroup_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editgroup_annotations_with_http_info(editgroup_id, async=True) + 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 bool + :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' - :return: list[EditgroupAnnotation] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editgroup_annotations" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `get_editgroup_annotations`") # noqa: E501 - - if ('editgroup_id' in params and - len(params['editgroup_id']) > 26): - raise ValueError("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 params and - len(params['editgroup_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editgroup_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editgroup_id` when calling `get_editgroup_annotations`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 + if 'expand' in local_var_params: + query_params.append(('expand', local_var_params['expand'])) # noqa: E501 header_params = {} @@ -5151,10 +5668,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5168,10 +5681,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[EditgroupAnnotation]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -5179,74 +5692,87 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editgroups_reviewable(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editgroups_reviewable(async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editgroups_reviewable_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_editgroups_reviewable_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editgroups_reviewable_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editgroups_reviewable_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :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. - :return: list[Editgroup] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editgroups_reviewable" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'before' in params: - query_params.append(('before', params['before'])) # noqa: E501 - if 'since' in params: - query_params.append(('since', params['since'])) # noqa: E501 + 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 = {} @@ -5258,10 +5784,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5275,10 +5797,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[Editgroup]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -5286,64 +5808,77 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editor(editor_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editor(editor_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editor_with_http_info(editor_id, **kwargs) # noqa: E501 - else: - (data) = self.get_editor_with_http_info(editor_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editor_with_http_info(editor_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editor_id: (required) - :return: Editor + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editor" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editor_id' is set - if ('editor_id' not in params or - params['editor_id'] is None): - raise ValueError("Missing the required parameter `editor_id` when calling `get_editor`") # noqa: E501 + 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 params: - path_params['editor_id'] = params['editor_id'] # noqa: E501 + if 'editor_id' in local_var_params: + path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501 query_params = [] @@ -5357,10 +5892,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5374,10 +5905,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editor', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -5385,86 +5916,99 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editor_annotations(editor_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editor_annotations(editor_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editor_annotations_with_http_info(editor_id, **kwargs) # noqa: E501 - else: - (data) = self.get_editor_annotations_with_http_info(editor_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editor_annotations_with_http_info(editor_id, async=True) + 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 bool + :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. - :return: list[EditgroupAnnotation] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editor_annotations" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editor_id' is set - if ('editor_id' not in params or - params['editor_id'] is None): - raise ValueError("Missing the required parameter `editor_id` when calling `get_editor_annotations`") # noqa: E501 - - if ('editor_id' in params and - len(params['editor_id']) > 26): - raise ValueError("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 params and - len(params['editor_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editor_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editor_id` when calling `get_editor_annotations`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editor_id'] = params['editor_id'] # noqa: E501 + if 'editor_id' in local_var_params: + path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'before' in params: - query_params.append(('before', params['before'])) # noqa: E501 - if 'since' in params: - query_params.append(('since', params['since'])) # 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 = {} @@ -5476,10 +6020,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5493,10 +6033,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[EditgroupAnnotation]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -5504,78 +6044,91 @@ class DefaultApi(object): 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=True - >>> thread = api.get_editor_editgroups(editor_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_editor_editgroups(editor_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_editor_editgroups_with_http_info(editor_id, **kwargs) # noqa: E501 - else: - (data) = self.get_editor_editgroups_with_http_info(editor_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_editor_editgroups_with_http_info(editor_id, async=True) + 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 bool + :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. - :return: list[Editgroup] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_editor_editgroups" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editor_id' is set - if ('editor_id' not in params or - params['editor_id'] is None): - raise ValueError("Missing the required parameter `editor_id` when calling `get_editor_editgroups`") # noqa: E501 + 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 params: - path_params['editor_id'] = params['editor_id'] # noqa: E501 + if 'editor_id' in local_var_params: + path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - if 'before' in params: - query_params.append(('before', params['before'])) # noqa: E501 - if 'since' in params: - query_params.append(('since', params['since'])) # 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 = {} @@ -5587,10 +6140,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5604,83 +6153,96 @@ class DefaultApi(object): files=local_var_files, response_type='list[Editgroup]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_file(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_file_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_file_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_file_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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). - :return: FileEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_file`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -5692,10 +6254,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5709,81 +6267,94 @@ class DefaultApi(object): files=local_var_files, response_type='FileEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_file_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_file_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_file_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_file_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_file_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_file_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -5797,10 +6368,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5814,79 +6381,92 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_file_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_file_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_file_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_file_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_file_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_file_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -5898,10 +6478,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -5915,73 +6491,86 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_file_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_file_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_file_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_file_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_file_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_file_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -5995,10 +6584,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6012,91 +6597,104 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_file_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_file_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_file_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_file_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_file_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: FileEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_file_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_file_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -6108,10 +6706,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6125,83 +6719,96 @@ class DefaultApi(object): files=local_var_files, response_type='FileEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_fileset(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_fileset_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_fileset_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_fileset_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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. - :return: FilesetEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_fileset" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_fileset`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -6213,10 +6820,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6230,81 +6833,94 @@ class DefaultApi(object): files=local_var_files, response_type='FilesetEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_fileset_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_fileset_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_fileset_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_fileset_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_fileset_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_fileset_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -6318,10 +6934,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6335,79 +6947,92 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_fileset_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_fileset_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_fileset_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_fileset_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_fileset_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_fileset_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -6419,10 +7044,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6436,73 +7057,86 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_fileset_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_fileset_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_fileset_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_fileset_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_fileset_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_fileset_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -6516,10 +7150,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6533,91 +7163,104 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_fileset_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_fileset_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_fileset_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_fileset_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_fileset_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: FilesetEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_fileset_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_fileset_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -6629,10 +7272,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6646,10 +7285,10 @@ class DefaultApi(object): files=local_var_files, response_type='FilesetEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -6657,74 +7296,87 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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. - :return: ReleaseEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -6736,10 +7388,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6753,10 +7401,10 @@ class DefaultApi(object): files=local_var_files, response_type='ReleaseEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -6764,72 +7412,85 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_release_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_release_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -6843,10 +7504,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6860,10 +7517,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -6871,70 +7528,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_files(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_files(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_files_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_files_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_files_with_http_info(ident, async=True) + 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 bool + :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`. - :return: list[FileEntity] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_files" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release_files`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'hide' in local_var_params: + query_params.append(('hide', local_var_params['hide'])) # noqa: E501 header_params = {} @@ -6946,10 +7616,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -6963,10 +7629,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[FileEntity]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -6974,70 +7640,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_filesets(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_filesets(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_filesets_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_filesets_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_filesets_with_http_info(ident, async=True) + 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 bool + :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`. - :return: list[FilesetEntity] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_filesets" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release_filesets`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'hide' in local_var_params: + query_params.append(('hide', local_var_params['hide'])) # noqa: E501 header_params = {} @@ -7049,10 +7728,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7066,10 +7741,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[FilesetEntity]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -7077,70 +7752,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -7152,10 +7840,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7169,10 +7853,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -7180,64 +7864,77 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -7251,10 +7948,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7268,10 +7961,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -7279,82 +7972,95 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_release_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: ReleaseEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_release_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -7366,10 +8072,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7383,10 +8085,10 @@ class DefaultApi(object): files=local_var_files, response_type='ReleaseEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -7394,70 +8096,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_release_webcaptures(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_release_webcaptures(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_release_webcaptures_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_release_webcaptures_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_release_webcaptures_with_http_info(ident, async=True) + 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 bool + :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`. - :return: list[WebcaptureEntity] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_release_webcaptures" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_release_webcaptures`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'hide' in local_var_params: + query_params.append(('hide', local_var_params['hide'])) # noqa: E501 header_params = {} @@ -7469,10 +8184,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7486,83 +8197,96 @@ class DefaultApi(object): files=local_var_files, response_type='list[WebcaptureEntity]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_webcapture(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_webcapture_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_webcapture_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_webcapture_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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. - :return: WebcaptureEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_webcapture" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_webcapture`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -7574,10 +8298,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7591,81 +8311,94 @@ class DefaultApi(object): files=local_var_files, response_type='WebcaptureEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_webcapture_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_webcapture_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_webcapture_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_webcapture_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_webcapture_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_webcapture_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -7679,10 +8412,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7696,79 +8425,92 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_webcapture_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_webcapture_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_webcapture_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_webcapture_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_webcapture_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_webcapture_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -7780,10 +8522,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7797,73 +8535,86 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_webcapture_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_webcapture_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_webcapture_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_webcapture_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_webcapture_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_webcapture_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -7877,10 +8628,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -7894,91 +8641,104 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_webcapture_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webcapture_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_webcapture_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_webcapture_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_webcapture_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: WebcaptureEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_webcapture_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_webcapture_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -7990,10 +8750,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8007,83 +8763,96 @@ class DefaultApi(object): files=local_var_files, response_type='WebcaptureEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_work(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_work_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_with_http_info(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_with_http_info(ident, async_req=True) >>> result = thread.get() - :param async bool + :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). - :return: WorkEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_work`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -8095,10 +8864,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8112,81 +8877,94 @@ class DefaultApi(object): files=local_var_files, response_type='WorkEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_work_edit(edit_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_edit(edit_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - else: - (data) = self.get_work_edit_with_http_info(edit_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_edit_with_http_info(edit_id, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work_edit" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'edit_id' is set - if ('edit_id' not in params or - params['edit_id'] is None): - raise ValueError("Missing the required parameter `edit_id` when calling `get_work_edit`") # noqa: E501 - - if ('edit_id' in params and - len(params['edit_id']) > 36): - raise ValueError("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 params and - len(params['edit_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['edit_id'] = params['edit_id'] # noqa: E501 + if 'edit_id' in local_var_params: + path_params['edit_id'] = local_var_params['edit_id'] # noqa: E501 query_params = [] @@ -8200,10 +8978,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8217,79 +8991,92 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_work_history(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_history(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_history_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_work_history_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_history_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) :param int limit: - :return: list[EntityHistoryEntry] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work_history" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_work_history`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 header_params = {} @@ -8301,10 +9088,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8318,73 +9101,86 @@ class DefaultApi(object): files=local_var_files, response_type='list[EntityHistoryEntry]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_work_redirects(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_redirects(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_redirects_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_work_redirects_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_redirects_with_http_info(ident, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str ident: (required) - :return: list[str] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work_redirects" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_work_redirects`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] @@ -8398,10 +9194,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8415,10 +9207,10 @@ class DefaultApi(object): files=local_var_files, response_type='list[str]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -8426,70 +9218,83 @@ class DefaultApi(object): 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=True - >>> thread = api.get_work_releases(ident, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_releases(ident, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_releases_with_http_info(ident, **kwargs) # noqa: E501 - else: - (data) = self.get_work_releases_with_http_info(ident, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_releases_with_http_info(ident, async=True) + 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 bool + :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`. - :return: list[ReleaseEntity] + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work_releases" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ident' is set - if ('ident' not in params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `get_work_releases`") # noqa: E501 + 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 params: - path_params['ident'] = params['ident'] # noqa: E501 + if 'ident' in local_var_params: + path_params['ident'] = local_var_params['ident'] # noqa: E501 query_params = [] - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'hide' in local_var_params: + query_params.append(('hide', local_var_params['hide'])) # noqa: E501 header_params = {} @@ -8501,10 +9306,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8518,91 +9319,104 @@ class DefaultApi(object): files=local_var_files, response_type='list[ReleaseEntity]', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.get_work_revision(rev_id, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_work_revision(rev_id, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.get_work_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - else: - (data) = self.get_work_revision_with_http_info(rev_id, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.get_work_revision_with_http_info(rev_id, async=True) + 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 bool + :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`. - :return: WorkEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_work_revision" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rev_id' is set - if ('rev_id' not in params or - params['rev_id'] is None): - raise ValueError("Missing the required parameter `rev_id` when calling `get_work_revision`") # noqa: E501 - - if ('rev_id' in params and - len(params['rev_id']) > 36): - raise ValueError("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 params and - len(params['rev_id']) < 36): - raise ValueError("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 params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 - raise ValueError("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 + 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 params: - path_params['rev_id'] = params['rev_id'] # noqa: E501 + if 'rev_id' in local_var_params: + path_params['rev_id'] = local_var_params['rev_id'] # noqa: E501 query_params = [] - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # 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 = {} @@ -8614,10 +9428,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8631,10 +9441,10 @@ class DefaultApi(object): files=local_var_files, response_type='WorkEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -8642,82 +9452,95 @@ class DefaultApi(object): 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=True - >>> thread = api.lookup_container(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_container(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param str issnl: :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 - if kwargs.get('async'): - return self.lookup_container_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lookup_container_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.lookup_container_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_container_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param str issnl: :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`. - :return: ContainerEntity + :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', 'wikidata_qid', 'expand', 'hide'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method lookup_container" % key ) - params[key] = val - del params['kwargs'] - - if ('issnl' in params and - len(params['issnl']) > 9): - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be less than or equal to `9`") # noqa: E501 - if ('issnl' in params and - len(params['issnl']) < 9): - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, length must be greater than or equal to `9`") # noqa: E501 - if 'issnl' in params and not re.search('\\d{4}-\\d{3}[0-9X]', params['issnl']): # noqa: E501 - raise ValueError("Invalid value for parameter `issnl` when calling `lookup_container`, must conform to the pattern `/\\d{4}-\\d{3}[0-9X]/`") # noqa: E501 + 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 collection_formats = {} path_params = {} query_params = [] - if 'issnl' in params: - query_params.append(('issnl', params['issnl'])) # noqa: E501 - if 'wikidata_qid' in params: - query_params.append(('wikidata_qid', params['wikidata_qid'])) # noqa: E501 - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + if 'issnl' in local_var_params: + query_params.append(('issnl', local_var_params['issnl'])) # 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 = {} @@ -8729,10 +9552,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8746,91 +9565,104 @@ class DefaultApi(object): files=local_var_files, response_type='ContainerEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.lookup_creator(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_creator(async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.lookup_creator_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lookup_creator_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.lookup_creator_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_creator_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :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`. - :return: CreatorEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method lookup_creator" % key ) - params[key] = val - del params['kwargs'] - - if ('orcid' in params and - len(params['orcid']) > 19): - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be less than or equal to `19`") # noqa: E501 - if ('orcid' in params and - len(params['orcid']) < 19): - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501 - if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', params['orcid']): # noqa: E501 - raise ValueError("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 + 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 params: - query_params.append(('orcid', params['orcid'])) # noqa: E501 - if 'wikidata_qid' in params: - query_params.append(('wikidata_qid', params['wikidata_qid'])) # noqa: E501 - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + 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 = {} @@ -8842,10 +9674,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8859,111 +9687,124 @@ class DefaultApi(object): files=local_var_files, response_type='CreatorEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.lookup_file(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_file(async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.lookup_file_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lookup_file_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.lookup_file_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_file_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :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`. - :return: FileEntity + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method lookup_file" % key ) - params[key] = val - del params['kwargs'] - - if ('md5' in params and - len(params['md5']) > 32): - raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be less than or equal to `32`") # noqa: E501 - if ('md5' in params and - len(params['md5']) < 32): - raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be greater than or equal to `32`") # noqa: E501 - if 'md5' in params and not re.search('[a-f0-9]{32}', params['md5']): # noqa: E501 - raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{32}/`") # noqa: E501 - if ('sha1' in params and - len(params['sha1']) > 40): - raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be less than or equal to `40`") # noqa: E501 - if ('sha1' in params and - len(params['sha1']) < 40): - raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be greater than or equal to `40`") # noqa: E501 - if 'sha1' in params and not re.search('[a-f0-9]{40}', params['sha1']): # noqa: E501 - raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{40}/`") # noqa: E501 - if ('sha256' in params and - len(params['sha256']) > 64): - raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be less than or equal to `64`") # noqa: E501 - if ('sha256' in params and - len(params['sha256']) < 64): - raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be greater than or equal to `64`") # noqa: E501 - if 'sha256' in params and not re.search('[a-f0-9]{64}', params['sha256']): # noqa: E501 - raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{64}/`") # noqa: E501 + 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 params: - query_params.append(('md5', params['md5'])) # noqa: E501 - if 'sha1' in params: - query_params.append(('sha1', params['sha1'])) # noqa: E501 - if 'sha256' in params: - query_params.append(('sha256', params['sha256'])) # noqa: E501 - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + 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 = {} @@ -8975,10 +9816,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -8992,10 +9829,10 @@ class DefaultApi(object): files=local_var_files, response_type='FileEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -9003,11 +9840,11 @@ class DefaultApi(object): 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=True - >>> thread = api.lookup_release(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_release(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param str doi: :param str wikidata_qid: :param str isbn13: @@ -9020,27 +9857,30 @@ class DefaultApi(object): :param str mag: :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 - if kwargs.get('async'): - return self.lookup_release_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.lookup_release_with_http_info(**kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.lookup_release_with_http_info(async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.lookup_release_with_http_info(async_req=True) >>> result = thread.get() - :param async bool + :param async_req bool: execute request asynchronously :param str doi: :param str wikidata_qid: :param str isbn13: @@ -9053,56 +9893,66 @@ class DefaultApi(object): :param str mag: :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`. - :return: ReleaseEntity + :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', 'expand', 'hide'] # noqa: E501 - all_params.append('async') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method lookup_release" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if 'doi' in params: - query_params.append(('doi', params['doi'])) # noqa: E501 - if 'wikidata_qid' in params: - query_params.append(('wikidata_qid', params['wikidata_qid'])) # noqa: E501 - if 'isbn13' in params: - query_params.append(('isbn13', params['isbn13'])) # noqa: E501 - if 'pmid' in params: - query_params.append(('pmid', params['pmid'])) # noqa: E501 - if 'pmcid' in params: - query_params.append(('pmcid', params['pmcid'])) # noqa: E501 - if 'core' in params: - query_params.append(('core', params['core'])) # noqa: E501 - if 'arxiv' in params: - query_params.append(('arxiv', params['arxiv'])) # noqa: E501 - if 'jstor' in params: - query_params.append(('jstor', params['jstor'])) # noqa: E501 - if 'ark' in params: - query_params.append(('ark', params['ark'])) # noqa: E501 - if 'mag' in params: - query_params.append(('mag', params['mag'])) # noqa: E501 - if 'expand' in params: - query_params.append(('expand', params['expand'])) # noqa: E501 - if 'hide' in params: - query_params.append(('hide', params['hide'])) # noqa: E501 + 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 '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 = {} @@ -9114,10 +9964,6 @@ class DefaultApi(object): 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 = [] # noqa: E501 @@ -9131,10 +9977,10 @@ class DefaultApi(object): files=local_var_files, response_type='ReleaseEntity', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -9142,78 +9988,91 @@ class DefaultApi(object): 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=True - >>> thread = api.update_container(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_container(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_container_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_container_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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 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=True - >>> thread = api.update_container_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param ContainerEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_container" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_container`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_container`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_container`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -9223,8 +10082,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -9246,87 +10105,100 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.update_creator(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_creator(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_creator_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_creator_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_creator_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param CreatorEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_creator" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_creator`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_creator`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_creator`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -9336,8 +10208,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -9359,10 +10231,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -9370,84 +10242,97 @@ class DefaultApi(object): 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=True - >>> thread = api.update_editgroup(editgroup_id, editgroup, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_editgroup(editgroup_id, editgroup, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_editgroup_with_http_info(editgroup_id, editgroup, **kwargs) # noqa: E501 - else: - (data) = self.update_editgroup_with_http_info(editgroup_id, editgroup, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_editgroup_with_http_info(editgroup_id, editgroup, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: base32-encoded unique identifier (required) :param Editgroup editgroup: (required) :param bool submit: - :return: Editgroup + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_editgroup" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_editgroup`") # noqa: E501 + 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 params or - params['editgroup'] is None): - raise ValueError("Missing the required parameter `editgroup` when calling `update_editgroup`") # noqa: E501 - - if ('editgroup_id' in params and - len(params['editgroup_id']) > 26): - raise ValueError("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 params and - len(params['editgroup_id']) < 26): - raise ValueError("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 params and not re.search('[a-zA-Z2-7]{26}', params['editgroup_id']): # noqa: E501 - raise ValueError("Invalid value for parameter `editgroup_id` when calling `update_editgroup`, must conform to the pattern `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 + if 'editgroup_id' in local_var_params: + path_params['editgroup_id'] = local_var_params['editgroup_id'] # noqa: E501 query_params = [] - if 'submit' in params: - query_params.append(('submit', params['submit'])) # noqa: E501 + if 'submit' in local_var_params: + query_params.append(('submit', local_var_params['submit'])) # noqa: E501 header_params = {} @@ -9455,8 +10340,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'editgroup' in params: - body_params = params['editgroup'] + 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 @@ -9478,10 +10363,10 @@ class DefaultApi(object): files=local_var_files, response_type='Editgroup', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -9489,70 +10374,83 @@ class DefaultApi(object): 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=True - >>> thread = api.update_editor(editor_id, editor, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_editor(editor_id, editor, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_editor_with_http_info(editor_id, editor, **kwargs) # noqa: E501 - else: - (data) = self.update_editor_with_http_info(editor_id, editor, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_editor_with_http_info(editor_id, editor, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editor_id: (required) :param Editor editor: (required) - :return: Editor + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_editor" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editor_id' is set - if ('editor_id' not in params or - params['editor_id'] is None): - raise ValueError("Missing the required parameter `editor_id` when calling `update_editor`") # noqa: E501 + 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 params or - params['editor'] is None): - raise ValueError("Missing the required parameter `editor` when calling `update_editor`") # noqa: E501 + 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 params: - path_params['editor_id'] = params['editor_id'] # noqa: E501 + if 'editor_id' in local_var_params: + path_params['editor_id'] = local_var_params['editor_id'] # noqa: E501 query_params = [] @@ -9562,8 +10460,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'editor' in params: - body_params = params['editor'] + 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 @@ -9585,87 +10483,100 @@ class DefaultApi(object): files=local_var_files, response_type='Editor', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.update_file(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_file(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_file_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_file_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_file_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param FileEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_file" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_file`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_file`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_file`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -9675,8 +10586,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -9698,87 +10609,100 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.update_fileset(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_fileset(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_fileset_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_fileset_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_fileset_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param FilesetEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_fileset" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_fileset`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_fileset`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_fileset`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -9788,8 +10712,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -9811,10 +10735,10 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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 @@ -9822,78 +10746,91 @@ class DefaultApi(object): 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=True - >>> thread = api.update_release(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_release(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_release_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_release_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_release_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param ReleaseEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_release" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_release`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_release`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_release`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -9903,8 +10840,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -9926,87 +10863,100 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.update_webcapture(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_webcapture(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_webcapture_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_webcapture_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_webcapture_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param WebcaptureEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_webcapture" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_webcapture`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_webcapture`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_webcapture`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -10016,8 +10966,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -10039,87 +10989,100 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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=True - >>> thread = api.update_work(editgroup_id, ident, entity, async=True) + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_work(editgroup_id, ident, entity, async_req=True) >>> result = thread.get() - :param async bool + :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 - if kwargs.get('async'): - return self.update_work_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - else: - (data) = self.update_work_with_http_info(editgroup_id, ident, entity, **kwargs) # noqa: E501 - return data + 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=True - >>> thread = api.update_work_with_http_info(editgroup_id, ident, entity, async=True) + 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 bool + :param async_req bool: execute request asynchronously :param str editgroup_id: (required) :param str ident: (required) :param WorkEntity entity: (required) - :return: EntityEdit + :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') + all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_work" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'editgroup_id' is set - if ('editgroup_id' not in params or - params['editgroup_id'] is None): - raise ValueError("Missing the required parameter `editgroup_id` when calling `update_work`") # noqa: E501 + 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 params or - params['ident'] is None): - raise ValueError("Missing the required parameter `ident` when calling `update_work`") # noqa: E501 + 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 params or - params['entity'] is None): - raise ValueError("Missing the required parameter `entity` when calling `update_work`") # noqa: E501 + 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 params: - path_params['editgroup_id'] = params['editgroup_id'] # noqa: E501 - if 'ident' in params: - path_params['ident'] = params['ident'] # noqa: E501 + 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 = [] @@ -10129,8 +11092,8 @@ class DefaultApi(object): local_var_files = {} body_params = None - if 'entity' in params: - body_params = params['entity'] + 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 @@ -10152,8 +11115,8 @@ class DefaultApi(object): files=local_var_files, response_type='EntityEdit', # noqa: E501 auth_settings=auth_settings, - async=params.get('async'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), + 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_client.py b/python_openapi_client/fatcat_openapi_client/api_client.py index 6ece8a9a..12cb98ca 100644 --- a/python_openapi_client/fatcat_openapi_client/api_client.py +++ b/python_openapi_client/fatcat_openapi_client/api_client.py @@ -4,9 +4,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import @@ -26,18 +26,19 @@ 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 class ApiClient(object): - """Generic API client for Swagger client library builds. + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client @@ -46,6 +47,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -59,28 +62,37 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: configuration = Configuration() self.configuration = configuration + self.pool_threads = pool_threads - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' + self.user_agent = 'OpenAPI-Generator/0.3.1/python' def __del__(self): - try: - self.pool.close() - self.pool.join() - except: - pass + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -99,7 +111,7 @@ class ApiClient(object): 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): + _preload_content=True, _request_timeout=None, _host=None): config = self.configuration @@ -133,10 +145,11 @@ class ApiClient(object): # post parameters if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) + post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) 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) @@ -146,7 +159,11 @@ class ApiClient(object): body = self.sanitize_for_serialization(body) # request url - url = self.configuration.host + resource_path + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path # perform request and return response response_data = self.request( @@ -180,7 +197,7 @@ class ApiClient(object): convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. - If obj is swagger model, return the properties dict. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. @@ -202,12 +219,12 @@ class ApiClient(object): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # 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.swagger_types) + for attr, _ in six.iteritems(obj.openapi_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) @@ -248,12 +265,12 @@ class ApiClient(object): if type(klass) == str: if klass.startswith('list['): - sub_kls = re.match('list\[(.*)\]', klass).group(1) + 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('dict\(([^,]*), (.*)\)', klass).group(2) + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} @@ -277,12 +294,12 @@ class ApiClient(object): 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=None, + response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): + _preload_content=True, _request_timeout=None, _host=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async parameter. + To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -297,7 +314,7 @@ class ApiClient(object): :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async bool: execute request asynchronously + :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, @@ -310,19 +327,19 @@ class ApiClient(object): timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: - If async parameter is True, + If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. - If parameter async is False or missing, + If parameter async_req is False or missing, then the method will return the response directly. """ - if not async: + if not async_req: return 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) + _preload_content, _request_timeout, _host) else: thread = self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, @@ -331,7 +348,9 @@ class ApiClient(object): response_type, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout)) + _preload_content, + _request_timeout, + _host)) return thread def request(self, method, url, query_params=None, headers=None, @@ -390,7 +409,7 @@ class ApiClient(object): _request_timeout=_request_timeout, body=body) else: - raise ValueError( + raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) @@ -425,18 +444,14 @@ class ApiClient(object): new_params.append((k, v)) return new_params - def prepare_post_parameters(self, post_params=None, files=None): + def files_parameters(self, files=None): """Builds form parameters. - :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - if post_params: - params = post_params - if files: for k, v in six.iteritems(files): if not v: @@ -500,12 +515,14 @@ class ApiClient(object): 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 ValueError( + raise ApiValueError( 'Authentication token must be in `query` or `header`' ) @@ -544,12 +561,12 @@ class ApiClient(object): try: return klass(data) except UnicodeEncodeError: - return six.u(data) + return six.text_type(data) except TypeError: return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ @@ -602,13 +619,13 @@ class ApiClient(object): :return: model object. """ - if not klass.swagger_types and not hasattr(klass, + if not klass.openapi_types and not hasattr(klass, 'get_real_child_model'): return data kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): + 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))): diff --git a/python_openapi_client/fatcat_openapi_client/configuration.py b/python_openapi_client/fatcat_openapi_client/configuration.py index a62f555e..0cd7e1f2 100644 --- a/python_openapi_client/fatcat_openapi_client/configuration.py +++ b/python_openapi_client/fatcat_openapi_client/configuration.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -28,9 +28,9 @@ class TypeWithDefault(type): super(TypeWithDefault, cls).__init__(name, bases, dct) cls._default = None - def __call__(cls): + def __call__(cls, **kwargs): if cls._default is None: - cls._default = type.__call__(cls) + cls._default = type.__call__(cls, **kwargs) return copy.copy(cls._default) def set_default(cls, default): @@ -38,68 +38,104 @@ class TypeWithDefault(type): class Configuration(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://github.com/swagger-api/swagger-codegen + Ref: https://openapi-generator.tech Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s) + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication """ - def __init__(self): - """Constructor""" - # Default Base url - self.host = "https://api.fatcat.wiki/v0" - # Temp file folder for downloading files + def __init__(self, host="https://api.fatcat.wiki/v0", + api_key={}, api_key_prefix={}, + username="", password=""): + """Constructor + """ + self.host = host + """Default Base url + """ self.temp_folder_path = None - + """Temp file folder for downloading files + """ # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - - # Logging Settings + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ self.logger = {} + """Logging Settings + """ self.logger["package_logger"] = logging.getLogger("fatcat_openapi_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler + """Log format + """ self.logger_stream_handler = None - # Log file handler + """Log stream handler + """ self.logger_file_handler = None - # Debug file location + """Log file handler + """ self.logger_file = None - # Debug switch + """Debug file location + """ self.debug = False + """Debug switch + """ - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ self.ssl_ca_cert = None - # client certificate file + """Set this to customize the certificate file to verify the peer. + """ self.cert_file = None - # client key file + """client certificate file + """ self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. + """client key file + """ self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ - # Proxy URL self.proxy = None - # Safe chars for path_param + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ @property def logger_file(self): @@ -131,17 +167,6 @@ class Configuration(object): self.logger_file_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) @property def debug(self): @@ -203,11 +228,15 @@ class Configuration(object): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if (self.api_key.get(identifier) and - self.api_key_prefix.get(identifier)): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 - elif self.api_key.get(identifier): - return self.api_key[identifier] + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). @@ -231,7 +260,6 @@ class Configuration(object): 'key': 'Authorization', 'value': self.get_api_key_with_prefix('Authorization') }, - } def to_debug_report(self): @@ -243,5 +271,56 @@ class Configuration(object): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.3.1\n"\ - "SDK Package Version: 1.0.0".\ + "SDK Package Version: 0.3.1".\ format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.fatcat.wiki/v0", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables={}): + """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 + :return: URL based on host settings + """ + + servers = self.get_host_settings() + + # check array index out of bound + if index < 0 or index >= len(servers): + raise ValueError( + "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501 + .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']) + + return url diff --git a/python_openapi_client/fatcat_openapi_client/exceptions.py b/python_openapi_client/fatcat_openapi_client/exceptions.py new file mode 100644 index 00000000..8d26659c --- /dev/null +++ b/python_openapi_client/fatcat_openapi_client/exceptions.py @@ -0,0 +1,121 @@ +# 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 six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + 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 + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + 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(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + 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(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +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): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/python_openapi_client/fatcat_openapi_client/models/__init__.py b/python_openapi_client/fatcat_openapi_client/models/__init__.py index 30025a32..10b80063 100644 --- a/python_openapi_client/fatcat_openapi_client/models/__init__.py +++ b/python_openapi_client/fatcat_openapi_client/models/__init__.py @@ -6,9 +6,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py b/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py index 4fbad558..7b1da81b 100644 --- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py +++ b/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class AuthOidc(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'provider': 'str', 'sub': 'str', 'iss': 'str', @@ -45,7 +46,7 @@ class AuthOidc(object): } def __init__(self, provider=None, sub=None, iss=None, preferred_username=None): # noqa: E501 - """AuthOidc - a model defined in Swagger""" # noqa: E501 + """AuthOidc - a model defined in OpenAPI""" # noqa: E501 self._provider = None self._sub = None @@ -162,7 +163,7 @@ class AuthOidc(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 54db8e76..5aa9dbfd 100644 --- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py +++ b/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editor import Editor # noqa: F401,E501 - class AuthOidcResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editor': 'Editor', 'token': 'str' } @@ -43,7 +42,7 @@ class AuthOidcResult(object): } def __init__(self, editor=None, token=None): # noqa: E501 - """AuthOidcResult - a model defined in Swagger""" # noqa: E501 + """AuthOidcResult - a model defined in OpenAPI""" # noqa: E501 self._editor = None self._token = None @@ -102,7 +101,7 @@ class AuthOidcResult(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index f1097592..19c45e2e 100644 --- a/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py +++ b/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class AuthTokenResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'token': 'str' } @@ -39,7 +40,7 @@ class AuthTokenResult(object): } def __init__(self, token=None): # noqa: E501 - """AuthTokenResult - a model defined in Swagger""" # noqa: E501 + """AuthTokenResult - a model defined in OpenAPI""" # noqa: E501 self._token = None self.discriminator = None @@ -73,7 +74,7 @@ class AuthTokenResult(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py b/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py index 79dbb0cf..bf9355d9 100644 --- a/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py +++ b/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 - class ChangelogEntry(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'index': 'int', 'editgroup_id': 'str', 'timestamp': 'datetime', @@ -47,7 +46,7 @@ class ChangelogEntry(object): } def __init__(self, index=None, editgroup_id=None, timestamp=None, editgroup=None): # noqa: E501 - """ChangelogEntry - a model defined in Swagger""" # noqa: E501 + """ChangelogEntry - a model defined in OpenAPI""" # noqa: E501 self._index = None self._editgroup_id = None @@ -161,7 +160,7 @@ class ChangelogEntry(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index df2e6b20..df30ca1d 100644 --- a/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.container_entity import ContainerEntity # noqa: F401,E501 -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 - class ContainerAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[ContainerEntity]' } @@ -44,7 +42,7 @@ class ContainerAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """ContainerAutoBatch - a model defined in Swagger""" # noqa: E501 + """ContainerAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class ContainerAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/container_entity.py b/python_openapi_client/fatcat_openapi_client/models/container_entity.py index d44fd744..470f2ee0 100644 --- a/python_openapi_client/fatcat_openapi_client/models/container_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/container_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,203 +18,222 @@ import six class ContainerEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'wikidata_qid': 'str', - 'issnl': 'str', - 'publisher': 'str', - 'container_type': 'str', - 'name': 'str', - 'edit_extra': 'object', - 'extra': 'object', - 'redirect': 'str', - 'revision': 'str', + openapi_types = { + 'state': 'str', 'ident': 'str', - 'state': 'str' + 'revision': 'str', + 'redirect': 'str', + 'extra': 'dict(str, object)', + 'edit_extra': 'dict(str, object)', + 'name': 'str', + 'container_type': 'str', + 'publisher': 'str', + 'issnl': 'str', + 'wikidata_qid': 'str' } attribute_map = { - 'wikidata_qid': 'wikidata_qid', - 'issnl': 'issnl', - 'publisher': 'publisher', - 'container_type': 'container_type', - 'name': 'name', - 'edit_extra': 'edit_extra', - 'extra': 'extra', - 'redirect': 'redirect', - 'revision': 'revision', + 'state': 'state', 'ident': 'ident', - 'state': 'state' + 'revision': 'revision', + 'redirect': 'redirect', + 'extra': 'extra', + 'edit_extra': 'edit_extra', + 'name': 'name', + 'container_type': 'container_type', + 'publisher': 'publisher', + 'issnl': 'issnl', + 'wikidata_qid': 'wikidata_qid' } - def __init__(self, wikidata_qid=None, issnl=None, publisher=None, container_type=None, name=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 - """ContainerEntity - a model defined in Swagger""" # noqa: E501 + def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, name=None, container_type=None, publisher=None, issnl=None, wikidata_qid=None): # noqa: E501 + """ContainerEntity - a model defined in OpenAPI""" # noqa: E501 - self._wikidata_qid = None - self._issnl = None - self._publisher = None - self._container_type = None - self._name = None - self._edit_extra = None - self._extra = None - self._redirect = None - self._revision = None - self._ident = None 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._publisher = None + self._issnl = None + self._wikidata_qid = None self.discriminator = None - if wikidata_qid is not None: - self.wikidata_qid = wikidata_qid - if issnl is not None: - self.issnl = issnl - if publisher is not None: - self.publisher = publisher - if container_type is not None: - self.container_type = container_type - if name is not None: - self.name = name - if edit_extra is not None: - self.edit_extra = edit_extra - if extra is not None: - self.extra = extra - if redirect is not None: - self.redirect = redirect - if revision is not None: - self.revision = revision - if ident is not None: - self.ident = ident 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 publisher is not None: + self.publisher = publisher + if issnl is not None: + self.issnl = issnl + if wikidata_qid is not None: + self.wikidata_qid = wikidata_qid @property - def wikidata_qid(self): - """Gets the wikidata_qid of this ContainerEntity. # noqa: E501 + def state(self): + """Gets the state of this ContainerEntity. # noqa: E501 - :return: The wikidata_qid of this ContainerEntity. # noqa: E501 + :return: The state of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._wikidata_qid + return self._state - @wikidata_qid.setter - def wikidata_qid(self, wikidata_qid): - """Sets the wikidata_qid of this ContainerEntity. + @state.setter + def state(self, state): + """Sets the state of this ContainerEntity. - :param wikidata_qid: The wikidata_qid of this ContainerEntity. # noqa: E501 + :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._wikidata_qid = wikidata_qid + self._state = state @property - def issnl(self): - """Gets the issnl of this ContainerEntity. # noqa: E501 + def ident(self): + """Gets the ident of this ContainerEntity. # noqa: E501 - Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The issnl of this ContainerEntity. # noqa: E501 + :return: The ident of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._issnl + return self._ident - @issnl.setter - def issnl(self, issnl): - """Sets the issnl of this ContainerEntity. + @ident.setter + def ident(self, ident): + """Sets the ident of this ContainerEntity. - Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :param issnl: The issnl of this ContainerEntity. # noqa: E501 + :param ident: The ident 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('\\d{4}-\\d{3}[0-9X]', issnl): # noqa: E501 - raise ValueError("Invalid value for `issnl`, must be a follow pattern or equal to `/\\d{4}-\\d{3}[0-9X]/`") # 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._issnl = issnl + self._ident = ident @property - def publisher(self): - """Gets the publisher of this ContainerEntity. # noqa: E501 + def revision(self): + """Gets the revision of this ContainerEntity. # noqa: E501 - Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :return: The publisher of this ContainerEntity. # noqa: E501 + :return: The revision of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._publisher + return self._revision - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this ContainerEntity. + @revision.setter + def revision(self, revision): + """Sets the revision of this ContainerEntity. - Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :param publisher: The publisher of this ContainerEntity. # 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._publisher = publisher + self._revision = revision @property - def container_type(self): - """Gets the container_type of this ContainerEntity. # noqa: E501 + def redirect(self): + """Gets the redirect of this ContainerEntity. # noqa: E501 - Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The container_type of this ContainerEntity. # noqa: E501 + :return: The redirect of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._container_type + return self._redirect - @container_type.setter - def container_type(self, container_type): - """Sets the container_type of this ContainerEntity. + @redirect.setter + def redirect(self, redirect): + """Sets the redirect of this ContainerEntity. - Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :param container_type: The container_type of this ContainerEntity. # 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._container_type = container_type + self._redirect = redirect @property - def name(self): - """Gets the name of this ContainerEntity. # noqa: E501 + def extra(self): + """Gets the extra of this ContainerEntity. # noqa: E501 - Name of the container (eg, Journal title). Required for entity creation. # 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 name of this ContainerEntity. # noqa: E501 - :rtype: str + :return: The extra of this ContainerEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._name + return self._extra - @name.setter - def name(self, name): - """Sets the name of this ContainerEntity. + @extra.setter + def extra(self, extra): + """Sets the extra of this ContainerEntity. - Name of the container (eg, Journal title). Required for entity creation. # noqa: E501 + Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - :param name: The name of this ContainerEntity. # noqa: E501 - :type: str + :param extra: The extra of this ContainerEntity. # noqa: E501 + :type: dict(str, object) """ - self._name = name + self._extra = extra @property def edit_extra(self): @@ -223,7 +242,7 @@ class ContainerEntity(object): 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: object + :rtype: dict(str, object) """ return self._edit_extra @@ -234,153 +253,135 @@ class ContainerEntity(object): 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: object + :type: dict(str, object) """ self._edit_extra = edit_extra @property - def extra(self): - """Gets the extra of this ContainerEntity. # noqa: E501 + def name(self): + """Gets the name 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 + Name of the container (eg, Journal title). Required for entity creation. # noqa: E501 - :return: The extra of this ContainerEntity. # noqa: E501 - :rtype: object + :return: The name of this ContainerEntity. # noqa: E501 + :rtype: str """ - return self._extra + return self._name - @extra.setter - def extra(self, extra): - """Sets the extra of this ContainerEntity. + @name.setter + def name(self, name): + """Sets the name of this ContainerEntity. - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 + Name of the container (eg, Journal title). Required for entity creation. # noqa: E501 - :param extra: The extra of this ContainerEntity. # noqa: E501 - :type: object + :param name: The name of this ContainerEntity. # noqa: E501 + :type: str """ - self._extra = extra + self._name = name @property - def redirect(self): - """Gets the redirect of this ContainerEntity. # noqa: E501 + def container_type(self): + """Gets the container_type of this ContainerEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 + Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 - :return: The redirect of this ContainerEntity. # noqa: E501 + :return: The container_type of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._redirect + return self._container_type - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this ContainerEntity. + @container_type.setter + def container_type(self, container_type): + """Sets the container_type of this ContainerEntity. - base32-encoded unique identifier # noqa: E501 + Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 - :param redirect: The redirect of this ContainerEntity. # noqa: E501 + :param container_type: The container_type 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._redirect = redirect + self._container_type = container_type @property - def revision(self): - """Gets the revision of this ContainerEntity. # noqa: E501 + def publisher(self): + """Gets the publisher of this ContainerEntity. # noqa: E501 - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 - :return: The revision of this ContainerEntity. # noqa: E501 + :return: The publisher of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._revision + return self._publisher - @revision.setter - def revision(self, revision): - """Sets the revision of this ContainerEntity. + @publisher.setter + def publisher(self, publisher): + """Sets the publisher of this ContainerEntity. - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 - :param revision: The revision of this ContainerEntity. # noqa: E501 + :param publisher: The publisher 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('[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("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 + self._publisher = publisher @property - def ident(self): - """Gets the ident of this ContainerEntity. # noqa: E501 + def issnl(self): + """Gets the issnl of this ContainerEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 + Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 - :return: The ident of this ContainerEntity. # noqa: E501 + :return: The issnl of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._ident + return self._issnl - @ident.setter - def ident(self, ident): - """Sets the ident of this ContainerEntity. + @issnl.setter + def issnl(self, issnl): + """Sets the issnl of this ContainerEntity. - base32-encoded unique identifier # noqa: E501 + Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 - :param ident: The ident of this ContainerEntity. # noqa: E501 + :param issnl: The issnl 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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._ident = ident + self._issnl = issnl @property - def state(self): - """Gets the state of this ContainerEntity. # noqa: E501 + def wikidata_qid(self): + """Gets the wikidata_qid of this ContainerEntity. # noqa: E501 - :return: The state of this ContainerEntity. # noqa: E501 + :return: The wikidata_qid of this ContainerEntity. # noqa: E501 :rtype: str """ - return self._state + return self._wikidata_qid - @state.setter - def state(self, state): - """Sets the state of this ContainerEntity. + @wikidata_qid.setter + def wikidata_qid(self, wikidata_qid): + """Sets the wikidata_qid of this ContainerEntity. - :param state: The state of this ContainerEntity. # noqa: E501 + :param wikidata_qid: The wikidata_qid 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 + self._wikidata_qid = wikidata_qid def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 50cc00c2..d6a2df87 100644 --- a/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.creator_entity import CreatorEntity # noqa: F401,E501 -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 - class CreatorAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[CreatorEntity]' } @@ -44,7 +42,7 @@ class CreatorAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """CreatorAutoBatch - a model defined in Swagger""" # noqa: E501 + """CreatorAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class CreatorAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/creator_entity.py b/python_openapi_client/fatcat_openapi_client/models/creator_entity.py index 56c19e99..41d00b6e 100644 --- a/python_openapi_client/fatcat_openapi_client/models/creator_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/creator_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,72 +18,63 @@ import six class CreatorEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'wikidata_qid': 'str', - 'orcid': 'str', - 'surname': 'str', - 'given_name': 'str', - 'display_name': 'str', + openapi_types = { 'state': 'str', 'ident': 'str', 'revision': 'str', 'redirect': 'str', - 'extra': 'object', - 'edit_extra': 'object' + 'extra': 'dict(str, object)', + 'edit_extra': 'dict(str, object)', + 'display_name': 'str', + 'given_name': 'str', + 'surname': 'str', + 'orcid': 'str', + 'wikidata_qid': 'str' } attribute_map = { - 'wikidata_qid': 'wikidata_qid', - 'orcid': 'orcid', - 'surname': 'surname', - 'given_name': 'given_name', - 'display_name': 'display_name', 'state': 'state', 'ident': 'ident', 'revision': 'revision', 'redirect': 'redirect', 'extra': 'extra', - 'edit_extra': 'edit_extra' + 'edit_extra': 'edit_extra', + 'display_name': 'display_name', + 'given_name': 'given_name', + 'surname': 'surname', + 'orcid': 'orcid', + 'wikidata_qid': 'wikidata_qid' } - def __init__(self, wikidata_qid=None, orcid=None, surname=None, given_name=None, display_name=None, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 - """CreatorEntity - a model defined in Swagger""" # noqa: E501 + 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._wikidata_qid = None - self._orcid = None - self._surname = None - self._given_name = None - self._display_name = None 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 wikidata_qid is not None: - self.wikidata_qid = wikidata_qid - if orcid is not None: - self.orcid = orcid - if surname is not None: - self.surname = surname - if given_name is not None: - self.given_name = given_name - if display_name is not None: - self.display_name = display_name if state is not None: self.state = state if ident is not None: @@ -96,127 +87,16 @@ class CreatorEntity(object): self.extra = extra if edit_extra is not None: self.edit_extra = edit_extra - - @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 - - @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('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', orcid): # noqa: E501 - raise ValueError("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 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 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 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 + 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): @@ -269,8 +149,8 @@ class CreatorEntity(object): 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -298,8 +178,8 @@ class CreatorEntity(object): 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('[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("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 + 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 @@ -327,8 +207,8 @@ class CreatorEntity(object): 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -339,7 +219,7 @@ class CreatorEntity(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -350,7 +230,7 @@ class CreatorEntity(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -362,7 +242,7 @@ class CreatorEntity(object): 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: object + :rtype: dict(str, object) """ return self._edit_extra @@ -373,16 +253,137 @@ class CreatorEntity(object): 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: object + :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.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup.py b/python_openapi_client/fatcat_openapi_client/models/editgroup.py index 37e0628a..37742d90 100644 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup.py +++ b/python_openapi_client/fatcat_openapi_client/models/editgroup.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup_annotation import EditgroupAnnotation # noqa: F401,E501 -from fatcat_openapi_client.models.editgroup_edits import EditgroupEdits # noqa: F401,E501 -from fatcat_openapi_client.models.editor import Editor # noqa: F401,E501 - class Editgroup(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup_id': 'str', 'editor_id': 'str', 'editor': 'Editor', @@ -42,7 +39,7 @@ class Editgroup(object): 'created': 'datetime', 'submitted': 'datetime', 'description': 'str', - 'extra': 'object', + 'extra': 'dict(str, object)', 'annotations': 'list[EditgroupAnnotation]', 'edits': 'EditgroupEdits' } @@ -61,7 +58,7 @@ class Editgroup(object): } 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 Swagger""" # noqa: E501 + """Editgroup - a model defined in OpenAPI""" # noqa: E501 self._editgroup_id = None self._editor_id = None @@ -120,8 +117,8 @@ class Editgroup(object): 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('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -149,8 +146,8 @@ class Editgroup(object): 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('[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError("Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -158,7 +155,6 @@ class Editgroup(object): def editor(self): """Gets the editor of this Editgroup. # noqa: E501 - Complete editor object identified by `container_id` field. Only included in GET responses. # noqa: E501 :return: The editor of this Editgroup. # noqa: E501 :rtype: Editor @@ -169,7 +165,6 @@ class Editgroup(object): def editor(self, editor): """Sets the editor of this Editgroup. - Complete editor object identified by `container_id` field. Only included in GET responses. # noqa: E501 :param editor: The editor of this Editgroup. # noqa: E501 :type: Editor @@ -276,7 +271,7 @@ class Editgroup(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -287,7 +282,7 @@ class Editgroup(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -340,7 +335,7 @@ class Editgroup(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py index 5f648a92..81868060 100644 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py +++ b/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,30 +16,29 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editor import Editor # noqa: F401,E501 - class EditgroupAnnotation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'annotation_id': 'str', 'editgroup_id': 'str', 'editor_id': 'str', 'editor': 'Editor', 'created': 'datetime', 'comment_markdown': 'str', - 'extra': 'object' + 'extra': 'dict(str, object)' } attribute_map = { @@ -53,7 +52,7 @@ class EditgroupAnnotation(object): } 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 Swagger""" # noqa: E501 + """EditgroupAnnotation - a model defined in OpenAPI""" # noqa: E501 self._annotation_id = None self._editgroup_id = None @@ -103,8 +102,8 @@ class EditgroupAnnotation(object): 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('[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("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 + 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 @@ -132,8 +131,8 @@ class EditgroupAnnotation(object): 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('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -161,8 +160,8 @@ class EditgroupAnnotation(object): 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('[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError("Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -170,7 +169,6 @@ class EditgroupAnnotation(object): def editor(self): """Gets the editor of this EditgroupAnnotation. # noqa: E501 - Only included in GET responses; ignored in PUT or POST requests. # noqa: E501 :return: The editor of this EditgroupAnnotation. # noqa: E501 :rtype: Editor @@ -181,7 +179,6 @@ class EditgroupAnnotation(object): def editor(self, editor): """Sets the editor of this EditgroupAnnotation. - Only included in GET responses; ignored in PUT or POST requests. # noqa: E501 :param editor: The editor of this EditgroupAnnotation. # noqa: E501 :type: Editor @@ -240,7 +237,7 @@ class EditgroupAnnotation(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -251,7 +248,7 @@ class EditgroupAnnotation(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -260,7 +257,7 @@ class EditgroupAnnotation(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py index 6a8e2a46..39340ce9 100644 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py +++ b/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.entity_edit import EntityEdit # noqa: F401,E501 - class EditgroupEdits(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'containers': 'list[EntityEdit]', 'creators': 'list[EntityEdit]', 'files': 'list[EntityEdit]', @@ -53,7 +52,7 @@ class EditgroupEdits(object): } def __init__(self, containers=None, creators=None, files=None, filesets=None, webcaptures=None, releases=None, works=None): # noqa: E501 - """EditgroupEdits - a model defined in Swagger""" # noqa: E501 + """EditgroupEdits - a model defined in OpenAPI""" # noqa: E501 self._containers = None self._creators = None @@ -230,7 +229,7 @@ class EditgroupEdits(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/editor.py b/python_openapi_client/fatcat_openapi_client/models/editor.py index 1d6b6c81..d526531e 100644 --- a/python_openapi_client/fatcat_openapi_client/models/editor.py +++ b/python_openapi_client/fatcat_openapi_client/models/editor.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class Editor(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editor_id': 'str', 'username': 'str', 'is_admin': 'bool', @@ -47,7 +48,7 @@ class Editor(object): } def __init__(self, editor_id=None, username=None, is_admin=None, is_bot=None, is_active=None): # noqa: E501 - """Editor - a model defined in Swagger""" # noqa: E501 + """Editor - a model defined in OpenAPI""" # noqa: E501 self._editor_id = None self._username = None @@ -90,8 +91,8 @@ class Editor(object): 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('[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError("Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -193,7 +194,7 @@ class Editor(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py index 7b28ae70..be35815f 100644 --- a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py +++ b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,26 +18,27 @@ import six class EntityEdit(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'edit_id': 'str', 'ident': 'str', 'revision': 'str', 'prev_revision': 'str', 'redirect_ident': 'str', 'editgroup_id': 'str', - 'extra': 'object' + 'extra': 'dict(str, object)' } attribute_map = { @@ -51,7 +52,7 @@ class EntityEdit(object): } 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 Swagger""" # noqa: E501 + """EntityEdit - a model defined in OpenAPI""" # noqa: E501 self._edit_id = None self._ident = None @@ -100,8 +101,8 @@ class EntityEdit(object): 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('[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("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 + 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 @@ -131,8 +132,8 @@ class EntityEdit(object): 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -160,8 +161,8 @@ class EntityEdit(object): 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('[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("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 + 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 @@ -189,8 +190,8 @@ class EntityEdit(object): 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('[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("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 + 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 @@ -218,8 +219,8 @@ class EntityEdit(object): 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('[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501 - raise ValueError("Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -249,8 +250,8 @@ class EntityEdit(object): 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('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -260,7 +261,7 @@ class EntityEdit(object): :return: The extra of this EntityEdit. # noqa: E501 - :rtype: object + :rtype: dict(str, object) """ return self._extra @@ -270,7 +271,7 @@ class EntityEdit(object): :param extra: The extra of this EntityEdit. # noqa: E501 - :type: object + :type: dict(str, object) """ self._extra = extra @@ -279,7 +280,7 @@ class EntityEdit(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index e3f18836..14639b1a 100644 --- a/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py +++ b/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,25 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.changelog_entry import ChangelogEntry # noqa: F401,E501 -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.entity_edit import EntityEdit # noqa: F401,E501 - class EntityHistoryEntry(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'edit': 'EntityEdit', 'editgroup': 'Editgroup', 'changelog_entry': 'ChangelogEntry' @@ -47,7 +44,7 @@ class EntityHistoryEntry(object): } def __init__(self, edit=None, editgroup=None, changelog_entry=None): # noqa: E501 - """EntityHistoryEntry - a model defined in Swagger""" # noqa: E501 + """EntityHistoryEntry - a model defined in OpenAPI""" # noqa: E501 self._edit = None self._editgroup = None @@ -131,7 +128,7 @@ class EntityHistoryEntry(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/error_response.py b/python_openapi_client/fatcat_openapi_client/models/error_response.py index 7c03b68d..3406c52e 100644 --- a/python_openapi_client/fatcat_openapi_client/models/error_response.py +++ b/python_openapi_client/fatcat_openapi_client/models/error_response.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class ErrorResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'success': 'bool', 'error': 'str', 'message': 'str' @@ -43,7 +44,7 @@ class ErrorResponse(object): } def __init__(self, success=None, error=None, message=None): # noqa: E501 - """ErrorResponse - a model defined in Swagger""" # noqa: E501 + """ErrorResponse - a model defined in OpenAPI""" # noqa: E501 self._success = None self._error = None @@ -127,7 +128,7 @@ class ErrorResponse(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index a9b22f2a..b34f5401 100644 --- a/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.file_entity import FileEntity # noqa: F401,E501 - class FileAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[FileEntity]' } @@ -44,7 +42,7 @@ class FileAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """FileAutoBatch - a model defined in Swagger""" # noqa: E501 + """FileAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class FileAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/file_entity.py b/python_openapi_client/fatcat_openapi_client/models/file_entity.py index d5d5cbba..e52635a6 100644 --- a/python_openapi_client/fatcat_openapi_client/models/file_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/file_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,278 +16,262 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.file_url import FileUrl # noqa: F401,E501 - class FileEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'releases': 'list[ReleaseEntity]', - 'release_ids': 'list[str]', - 'mimetype': 'str', - 'urls': 'list[FileUrl]', - 'sha256': 'str', - 'sha1': 'str', - 'md5': 'str', - 'size': 'int', - 'edit_extra': 'object', - 'extra': 'object', - 'redirect': 'str', - 'revision': 'str', + openapi_types = { + 'state': 'str', 'ident': 'str', - 'state': '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', + 'release_ids': 'list[str]', + 'releases': 'list[ReleaseEntity]' } attribute_map = { - 'releases': 'releases', - 'release_ids': 'release_ids', - 'mimetype': 'mimetype', - 'urls': 'urls', - 'sha256': 'sha256', - 'sha1': 'sha1', - 'md5': 'md5', - 'size': 'size', - 'edit_extra': 'edit_extra', - 'extra': 'extra', - 'redirect': 'redirect', - 'revision': 'revision', + 'state': 'state', 'ident': 'ident', - 'state': 'state' + 'revision': 'revision', + 'redirect': 'redirect', + 'extra': 'extra', + 'edit_extra': 'edit_extra', + 'size': 'size', + 'md5': 'md5', + 'sha1': 'sha1', + 'sha256': 'sha256', + 'urls': 'urls', + 'mimetype': 'mimetype', + 'release_ids': 'release_ids', + 'releases': 'releases' } - def __init__(self, releases=None, release_ids=None, mimetype=None, urls=None, sha256=None, sha1=None, md5=None, size=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 - """FileEntity - a model defined in Swagger""" # noqa: E501 + 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, release_ids=None, releases=None): # noqa: E501 + """FileEntity - a model defined in OpenAPI""" # noqa: E501 - self._releases = None - self._release_ids = None - self._mimetype = None - self._urls = None - self._sha256 = None - self._sha1 = None - self._md5 = None - self._size = None - self._edit_extra = None - self._extra = None - self._redirect = None - self._revision = None - self._ident = None 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._release_ids = None + self._releases = None self.discriminator = None - if releases is not None: - self.releases = releases - if release_ids is not None: - self.release_ids = release_ids - if mimetype is not None: - self.mimetype = mimetype - if urls is not None: - self.urls = urls - if sha256 is not None: - self.sha256 = sha256 - if sha1 is not None: - self.sha1 = sha1 - if md5 is not None: - self.md5 = md5 - if size is not None: - self.size = size - if edit_extra is not None: - self.edit_extra = edit_extra - if extra is not None: - self.extra = extra - if redirect is not None: - self.redirect = redirect - if revision is not None: - self.revision = revision - if ident is not None: - self.ident = ident 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 release_ids is not None: + self.release_ids = release_ids + if releases is not None: + self.releases = releases @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 - - @property - def release_ids(self): - """Gets the release_ids of this FileEntity. # noqa: E501 + def state(self): + """Gets the state 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: The state of this FileEntity. # noqa: E501 + :rtype: str """ - return self._release_ids + return self._state - @release_ids.setter - def release_ids(self, release_ids): - """Sets the release_ids of this FileEntity. + @state.setter + def state(self, state): + """Sets the state 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] + :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._release_ids = release_ids + self._state = state @property - def mimetype(self): - """Gets the mimetype of this FileEntity. # noqa: E501 + def ident(self): + """Gets the ident of this FileEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The mimetype of this FileEntity. # noqa: E501 + :return: The ident of this FileEntity. # noqa: E501 :rtype: str """ - return self._mimetype + return self._ident - @mimetype.setter - def mimetype(self, mimetype): - """Sets the mimetype of this FileEntity. + @ident.setter + def ident(self, ident): + """Sets the ident of this FileEntity. + base32-encoded unique identifier # noqa: E501 - :param mimetype: The mimetype of this FileEntity. # 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._mimetype = mimetype + self._ident = ident @property - def urls(self): - """Gets the urls of this FileEntity. # noqa: E501 + def revision(self): + """Gets the revision of this FileEntity. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :return: The urls of this FileEntity. # noqa: E501 - :rtype: list[FileUrl] + :return: The revision of this FileEntity. # noqa: E501 + :rtype: str """ - return self._urls + return self._revision - @urls.setter - def urls(self, urls): - """Sets the urls of this FileEntity. + @revision.setter + def revision(self, revision): + """Sets the revision of this FileEntity. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :param urls: The urls of this FileEntity. # noqa: E501 - :type: list[FileUrl] + :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._urls = urls + self._revision = revision @property - def sha256(self): - """Gets the sha256 of this FileEntity. # noqa: E501 + def redirect(self): + """Gets the redirect of this FileEntity. # noqa: E501 - SHA-256 hash of data, in hex encoding # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The sha256 of this FileEntity. # noqa: E501 + :return: The redirect of this FileEntity. # noqa: E501 :rtype: str """ - return self._sha256 + return self._redirect - @sha256.setter - def sha256(self, sha256): - """Sets the sha256 of this FileEntity. + @redirect.setter + def redirect(self, redirect): + """Sets the redirect of this FileEntity. - SHA-256 hash of data, in hex encoding # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :param sha256: The sha256 of this FileEntity. # noqa: E501 + :param redirect: The redirect 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('[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 + 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._sha256 = sha256 + self._redirect = redirect @property - def sha1(self): - """Gets the sha1 of this FileEntity. # noqa: E501 + def extra(self): + """Gets the extra of this FileEntity. # noqa: E501 - SHA-1 hash of data, in hex encoding # 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 sha1 of this FileEntity. # noqa: E501 - :rtype: str + :return: The extra of this FileEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._sha1 + return self._extra - @sha1.setter - def sha1(self, sha1): - """Sets the sha1 of this FileEntity. + @extra.setter + def extra(self, extra): + """Sets the extra of this FileEntity. - SHA-1 hash of data, in hex encoding # noqa: E501 + Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - :param sha1: The sha1 of this FileEntity. # noqa: E501 - :type: str + :param extra: The extra of this FileEntity. # noqa: E501 + :type: dict(str, object) """ - 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('[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 - self._sha1 = sha1 + self._extra = extra @property - def md5(self): - """Gets the md5 of this FileEntity. # noqa: E501 + def edit_extra(self): + """Gets the edit_extra of this FileEntity. # noqa: E501 - MD5 hash of data, in hex encoding # noqa: E501 + Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - :return: The md5 of this FileEntity. # noqa: E501 - :rtype: str + :return: The edit_extra of this FileEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._md5 + return self._edit_extra - @md5.setter - def md5(self, md5): - """Sets the md5 of this FileEntity. + @edit_extra.setter + def edit_extra(self, edit_extra): + """Sets the edit_extra of this FileEntity. - MD5 hash of data, in hex encoding # noqa: E501 + Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - :param md5: The md5 of this FileEntity. # noqa: E501 - :type: str + :param edit_extra: The edit_extra of this FileEntity. # noqa: E501 + :type: dict(str, object) """ - 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('[a-f0-9]{32}', md5): # noqa: E501 - raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501 - self._md5 = md5 + self._edit_extra = edit_extra @property def size(self): @@ -313,170 +297,185 @@ class FileEntity(object): self._size = size @property - def edit_extra(self): - """Gets the edit_extra of this FileEntity. # noqa: E501 + def md5(self): + """Gets the md5 of this FileEntity. # noqa: E501 - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 + MD5 hash of data, in hex encoding # noqa: E501 - :return: The edit_extra of this FileEntity. # noqa: E501 - :rtype: object + :return: The md5 of this FileEntity. # noqa: E501 + :rtype: str """ - return self._edit_extra + return self._md5 - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this FileEntity. + @md5.setter + def md5(self, md5): + """Sets the md5 of this FileEntity. - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 + MD5 hash of data, in hex encoding # noqa: E501 - :param edit_extra: The edit_extra of this FileEntity. # noqa: E501 - :type: object + :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._edit_extra = edit_extra + self._md5 = md5 @property - def extra(self): - """Gets the extra of this FileEntity. # noqa: E501 + def sha1(self): + """Gets the sha1 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 + SHA-1 hash of data, in hex encoding # noqa: E501 - :return: The extra of this FileEntity. # noqa: E501 - :rtype: object + :return: The sha1 of this FileEntity. # noqa: E501 + :rtype: str """ - return self._extra + return self._sha1 - @extra.setter - def extra(self, extra): - """Sets the extra of this FileEntity. + @sha1.setter + def sha1(self, sha1): + """Sets the sha1 of this FileEntity. - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 + SHA-1 hash of data, in hex encoding # noqa: E501 - :param extra: The extra of this FileEntity. # noqa: E501 - :type: object + :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._extra = extra + self._sha1 = sha1 @property - def redirect(self): - """Gets the redirect of this FileEntity. # noqa: E501 + def sha256(self): + """Gets the sha256 of this FileEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 + SHA-256 hash of data, in hex encoding # noqa: E501 - :return: The redirect of this FileEntity. # noqa: E501 + :return: The sha256 of this FileEntity. # noqa: E501 :rtype: str """ - return self._redirect + return self._sha256 - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this FileEntity. + @sha256.setter + def sha256(self, sha256): + """Sets the sha256 of this FileEntity. - base32-encoded unique identifier # noqa: E501 + SHA-256 hash of data, in hex encoding # noqa: E501 - :param redirect: The redirect of this FileEntity. # noqa: E501 + :param sha256: The sha256 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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._redirect = redirect + self._sha256 = sha256 @property - def revision(self): - """Gets the revision of this FileEntity. # noqa: E501 + def urls(self): + """Gets the urls 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: The urls of this FileEntity. # noqa: E501 + :rtype: list[FileUrl] """ - return self._revision + return self._urls - @revision.setter - def revision(self, revision): - """Sets the revision of this FileEntity. + @urls.setter + def urls(self, urls): + """Sets the urls 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 + :param urls: The urls of this FileEntity. # noqa: E501 + :type: list[FileUrl] """ - 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('[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("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 + self._urls = urls @property - def ident(self): - """Gets the ident of this FileEntity. # noqa: E501 + def mimetype(self): + """Gets the mimetype of this FileEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 - :return: The ident of this FileEntity. # noqa: E501 + :return: The mimetype of this FileEntity. # noqa: E501 :rtype: str """ - return self._ident + return self._mimetype - @ident.setter - def ident(self, ident): - """Sets the ident of this FileEntity. + @mimetype.setter + def mimetype(self, mimetype): + """Sets the mimetype of this FileEntity. - base32-encoded unique identifier # noqa: E501 - :param ident: The ident of this FileEntity. # noqa: E501 + :param mimetype: The mimetype 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._ident = ident + self._mimetype = mimetype @property - def state(self): - """Gets the state of this FileEntity. # noqa: E501 + 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 state of this FileEntity. # noqa: E501 - :rtype: str + :return: The release_ids of this FileEntity. # noqa: E501 + :rtype: list[str] """ - return self._state + return self._release_ids - @state.setter - def state(self, state): - """Sets the state of this FileEntity. + @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 state: The state of this FileEntity. # noqa: E501 - :type: str + :param release_ids: The release_ids of this FileEntity. # noqa: E501 + :type: list[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 + 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.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/file_url.py b/python_openapi_client/fatcat_openapi_client/models/file_url.py index 9390e2b8..6dc8ebe6 100644 --- a/python_openapi_client/fatcat_openapi_client/models/file_url.py +++ b/python_openapi_client/fatcat_openapi_client/models/file_url.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class FileUrl(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'url': 'str', 'rel': 'str' } @@ -41,7 +42,7 @@ class FileUrl(object): } def __init__(self, url=None, rel=None): # noqa: E501 - """FileUrl - a model defined in Swagger""" # noqa: E501 + """FileUrl - a model defined in OpenAPI""" # noqa: E501 self._url = None self._rel = None @@ -104,7 +105,7 @@ class FileUrl(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 4a2987ea..d3a15279 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.fileset_entity import FilesetEntity # noqa: F401,E501 - class FilesetAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[FilesetEntity]' } @@ -44,7 +42,7 @@ class FilesetAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """FilesetAutoBatch - a model defined in Swagger""" # noqa: E501 + """FilesetAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class FilesetAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py index e35c7a1a..51952d2a 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,72 +16,62 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.fileset_file import FilesetFile # noqa: F401,E501 -from fatcat_openapi_client.models.fileset_url import FilesetUrl # noqa: F401,E501 - class FilesetEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'releases': 'list[ReleaseEntity]', - 'release_ids': 'list[str]', - 'urls': 'list[FilesetUrl]', - 'manifest': 'list[FilesetFile]', + openapi_types = { 'state': 'str', 'ident': 'str', 'revision': 'str', 'redirect': 'str', - 'extra': 'object', - 'edit_extra': 'object' + 'extra': 'dict(str, object)', + 'edit_extra': 'dict(str, object)', + 'manifest': 'list[FilesetFile]', + 'urls': 'list[FilesetUrl]', + 'release_ids': 'list[str]', + 'releases': 'list[ReleaseEntity]' } attribute_map = { - 'releases': 'releases', - 'release_ids': 'release_ids', - 'urls': 'urls', - 'manifest': 'manifest', 'state': 'state', 'ident': 'ident', 'revision': 'revision', 'redirect': 'redirect', 'extra': 'extra', - 'edit_extra': 'edit_extra' + 'edit_extra': 'edit_extra', + 'manifest': 'manifest', + 'urls': 'urls', + 'release_ids': 'release_ids', + 'releases': 'releases' } - def __init__(self, releases=None, release_ids=None, urls=None, manifest=None, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 - """FilesetEntity - a model defined in Swagger""" # noqa: E501 + def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, manifest=None, urls=None, release_ids=None, releases=None): # noqa: E501 + """FilesetEntity - a model defined in OpenAPI""" # noqa: E501 - self._releases = None - self._release_ids = None - self._urls = None - self._manifest = None self._state = None self._ident = None self._revision = None self._redirect = None self._extra = None self._edit_extra = None + self._manifest = None + self._urls = None + self._release_ids = None + self._releases = None self.discriminator = None - if releases is not None: - self.releases = releases - if release_ids is not None: - self.release_ids = release_ids - if urls is not None: - self.urls = urls - if manifest is not None: - self.manifest = manifest if state is not None: self.state = state if ident is not None: @@ -94,94 +84,14 @@ class FilesetEntity(object): self.extra = extra if edit_extra is not None: self.edit_extra = edit_extra - - @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 - - @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 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 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 + 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): @@ -234,8 +144,8 @@ class FilesetEntity(object): 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -263,8 +173,8 @@ class FilesetEntity(object): 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('[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("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 + 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 @@ -292,8 +202,8 @@ class FilesetEntity(object): 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -304,7 +214,7 @@ class FilesetEntity(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -315,7 +225,7 @@ class FilesetEntity(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -327,7 +237,7 @@ class FilesetEntity(object): 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: object + :rtype: dict(str, object) """ return self._edit_extra @@ -338,16 +248,104 @@ class FilesetEntity(object): 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: object + :type: dict(str, object) """ self._edit_extra = edit_extra + @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.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py index 9da23aad..15afd2f1 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,25 +18,26 @@ import six class FilesetFile(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'path': 'str', 'size': 'int', 'md5': 'str', 'sha1': 'str', 'sha256': 'str', - 'extra': 'object' + 'extra': 'dict(str, object)' } attribute_map = { @@ -49,7 +50,7 @@ class FilesetFile(object): } def __init__(self, path=None, size=None, md5=None, sha1=None, sha256=None, extra=None): # noqa: E501 - """FilesetFile - a model defined in Swagger""" # noqa: E501 + """FilesetFile - a model defined in OpenAPI""" # noqa: E501 self._path = None self._size = None @@ -144,8 +145,8 @@ class FilesetFile(object): 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('[a-f0-9]{32}', md5): # noqa: E501 - raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -173,8 +174,8 @@ class FilesetFile(object): 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('[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -202,8 +203,8 @@ class FilesetFile(object): 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('[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -214,7 +215,7 @@ class FilesetFile(object): Free-form additional metadata about this specific file in the set. Eg, `mimetype`. See guide for nomative (but unenforced) schema fields. # noqa: E501 :return: The extra of this FilesetFile. # noqa: E501 - :rtype: object + :rtype: dict(str, object) """ return self._extra @@ -225,7 +226,7 @@ class FilesetFile(object): Free-form additional metadata about this specific file in the set. Eg, `mimetype`. See guide for nomative (but unenforced) schema fields. # noqa: E501 :param extra: The extra of this FilesetFile. # noqa: E501 - :type: object + :type: dict(str, object) """ self._extra = extra @@ -234,7 +235,7 @@ class FilesetFile(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_url.py b/python_openapi_client/fatcat_openapi_client/models/fileset_url.py index f7efab60..cde1119c 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_url.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_url.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class FilesetUrl(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'url': 'str', 'rel': 'str' } @@ -41,7 +42,7 @@ class FilesetUrl(object): } def __init__(self, url=None, rel=None): # noqa: E501 - """FilesetUrl - a model defined in Swagger""" # noqa: E501 + """FilesetUrl - a model defined in OpenAPI""" # noqa: E501 self._url = None self._rel = None @@ -102,7 +103,7 @@ class FilesetUrl(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/release_abstract.py b/python_openapi_client/fatcat_openapi_client/models/release_abstract.py index 7ba8348e..c6c7aab7 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_abstract.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_abstract.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class ReleaseAbstract(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'sha1': 'str', 'content': 'str', 'mimetype': 'str', @@ -45,7 +46,7 @@ class ReleaseAbstract(object): } def __init__(self, sha1=None, content=None, mimetype=None, lang=None): # noqa: E501 - """ReleaseAbstract - a model defined in Swagger""" # noqa: E501 + """ReleaseAbstract - a model defined in OpenAPI""" # noqa: E501 self._sha1 = None self._content = None @@ -86,8 +87,8 @@ class ReleaseAbstract(object): 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('[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -164,7 +165,7 @@ class ReleaseAbstract(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 6c8df967..9d1f6bbc 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.release_entity import ReleaseEntity # noqa: F401,E501 - class ReleaseAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[ReleaseEntity]' } @@ -44,7 +42,7 @@ class ReleaseAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """ReleaseAutoBatch - a model defined in Swagger""" # noqa: E501 + """ReleaseAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class ReleaseAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/release_contrib.py b/python_openapi_client/fatcat_openapi_client/models/release_contrib.py index 01b464ac..f2de29df 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_contrib.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_contrib.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.creator_entity import CreatorEntity # noqa: F401,E501 - class ReleaseContrib(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'index': 'int', 'creator_id': 'str', 'creator': 'CreatorEntity', @@ -41,7 +40,7 @@ class ReleaseContrib(object): 'surname': 'str', 'role': 'str', 'raw_affiliation': 'str', - 'extra': 'object' + 'extra': 'dict(str, object)' } attribute_map = { @@ -57,7 +56,7 @@ class ReleaseContrib(object): } 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 Swagger""" # noqa: E501 + """ReleaseContrib - a model defined in OpenAPI""" # noqa: E501 self._index = None self._creator_id = None @@ -136,8 +135,8 @@ class ReleaseContrib(object): 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('[a-zA-Z2-7]{26}', creator_id): # noqa: E501 - raise ValueError("Invalid value for `creator_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -145,7 +144,6 @@ class ReleaseContrib(object): def creator(self): """Gets the creator of this ReleaseContrib. # noqa: E501 - Complete creator entity. Only returned in GET responses, and only if `contribs` included in the `expand` query parameter. # noqa: E501 :return: The creator of this ReleaseContrib. # noqa: E501 :rtype: CreatorEntity @@ -156,7 +154,6 @@ class ReleaseContrib(object): def creator(self, creator): """Sets the creator of this ReleaseContrib. - Complete creator entity. Only returned in GET responses, and only if `contribs` included in the `expand` query parameter. # noqa: E501 :param creator: The creator of this ReleaseContrib. # noqa: E501 :type: CreatorEntity @@ -286,7 +283,7 @@ class ReleaseContrib(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -297,7 +294,7 @@ class ReleaseContrib(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -306,7 +303,7 @@ class ReleaseContrib(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/release_entity.py b/python_openapi_client/fatcat_openapi_client/models/release_entity.py index 03a27cae..a88124d4 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,197 +16,134 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.container_entity import ContainerEntity # noqa: F401,E501 -from fatcat_openapi_client.models.file_entity import FileEntity # noqa: F401,E501 -from fatcat_openapi_client.models.fileset_entity import FilesetEntity # noqa: F401,E501 -from fatcat_openapi_client.models.release_abstract import ReleaseAbstract # noqa: F401,E501 -from fatcat_openapi_client.models.release_contrib import ReleaseContrib # noqa: F401,E501 -from fatcat_openapi_client.models.release_ext_ids import ReleaseExtIds # noqa: F401,E501 -from fatcat_openapi_client.models.release_ref import ReleaseRef # noqa: F401,E501 -from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity # noqa: F401,E501 - class ReleaseEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'abstracts': 'list[ReleaseAbstract]', - 'refs': 'list[ReleaseRef]', - 'contribs': 'list[ReleaseContrib]', - 'license_slug': 'str', - 'language': 'str', - 'publisher': 'str', - 'version': 'str', - 'number': 'str', - 'pages': 'str', - 'issue': 'str', - 'volume': 'str', - 'ext_ids': 'ReleaseExtIds', - 'withdrawn_year': 'int', - 'withdrawn_date': 'date', - 'withdrawn_status': 'str', - 'release_year': 'int', - 'release_date': 'date', - 'release_stage': 'str', - 'release_type': 'str', - 'container_id': 'str', - 'webcaptures': 'list[WebcaptureEntity]', - 'filesets': 'list[FilesetEntity]', - 'files': 'list[FileEntity]', - 'container': 'ContainerEntity', - 'work_id': 'str', - 'original_title': 'str', - 'subtitle': 'str', - 'title': 'str', + openapi_types = { 'state': 'str', 'ident': 'str', 'revision': 'str', 'redirect': 'str', - 'extra': 'object', - 'edit_extra': 'object' + '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 = { - 'abstracts': 'abstracts', - 'refs': 'refs', - 'contribs': 'contribs', - 'license_slug': 'license_slug', - 'language': 'language', - 'publisher': 'publisher', - 'version': 'version', - 'number': 'number', - 'pages': 'pages', - 'issue': 'issue', - 'volume': 'volume', - 'ext_ids': 'ext_ids', - 'withdrawn_year': 'withdrawn_year', - 'withdrawn_date': 'withdrawn_date', - 'withdrawn_status': 'withdrawn_status', - 'release_year': 'release_year', - 'release_date': 'release_date', - 'release_stage': 'release_stage', - 'release_type': 'release_type', - 'container_id': 'container_id', - 'webcaptures': 'webcaptures', - 'filesets': 'filesets', - 'files': 'files', - 'container': 'container', - 'work_id': 'work_id', - 'original_title': 'original_title', - 'subtitle': 'subtitle', - 'title': 'title', 'state': 'state', 'ident': 'ident', 'revision': 'revision', 'redirect': 'redirect', 'extra': 'extra', - 'edit_extra': 'edit_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, abstracts=None, refs=None, contribs=None, license_slug=None, language=None, publisher=None, version=None, number=None, pages=None, issue=None, volume=None, ext_ids=None, withdrawn_year=None, withdrawn_date=None, withdrawn_status=None, release_year=None, release_date=None, release_stage=None, release_type=None, container_id=None, webcaptures=None, filesets=None, files=None, container=None, work_id=None, original_title=None, subtitle=None, title=None, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 - """ReleaseEntity - a model defined in Swagger""" # noqa: E501 + 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._abstracts = None - self._refs = None - self._contribs = None - self._license_slug = None - self._language = None - self._publisher = None - self._version = None - self._number = None - self._pages = None - self._issue = None - self._volume = None - self._ext_ids = None - self._withdrawn_year = None - self._withdrawn_date = None - self._withdrawn_status = None - self._release_year = None - self._release_date = None - self._release_stage = None - self._release_type = None - self._container_id = None - self._webcaptures = None - self._filesets = None - self._files = None - self._container = None - self._work_id = None - self._original_title = None - self._subtitle = None - self._title = None 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 abstracts is not None: - self.abstracts = abstracts - if refs is not None: - self.refs = refs - if contribs is not None: - self.contribs = contribs - if license_slug is not None: - self.license_slug = license_slug - if language is not None: - self.language = language - if publisher is not None: - self.publisher = publisher - if version is not None: - self.version = version - if number is not None: - self.number = number - if pages is not None: - self.pages = pages - if issue is not None: - self.issue = issue - if volume is not None: - self.volume = volume - self.ext_ids = ext_ids - if withdrawn_year is not None: - self.withdrawn_year = withdrawn_year - if withdrawn_date is not None: - self.withdrawn_date = withdrawn_date - if withdrawn_status is not None: - self.withdrawn_status = withdrawn_status - if release_year is not None: - self.release_year = release_year - if release_date is not None: - self.release_date = release_date - if release_stage is not None: - self.release_stage = release_stage - if release_type is not None: - self.release_type = release_type - if container_id is not None: - self.container_id = container_id - if webcaptures is not None: - self.webcaptures = webcaptures - if filesets is not None: - self.filesets = filesets - if files is not None: - self.files = files - if container is not None: - self.container = container - if work_id is not None: - self.work_id = work_id - if original_title is not None: - self.original_title = original_title - if subtitle is not None: - self.subtitle = subtitle - if title is not None: - self.title = title if state is not None: self.state = state if ident is not None: @@ -219,370 +156,472 @@ class ReleaseEntity(object): 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 abstracts(self): - """Gets the abstracts of this ReleaseEntity. # noqa: E501 + def state(self): + """Gets the state of this ReleaseEntity. # noqa: E501 - :return: The abstracts of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseAbstract] + :return: The state of this ReleaseEntity. # noqa: E501 + :rtype: str """ - return self._abstracts + return self._state - @abstracts.setter - def abstracts(self, abstracts): - """Sets the abstracts of this ReleaseEntity. + @state.setter + def state(self, state): + """Sets the state of this ReleaseEntity. - :param abstracts: The abstracts of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseAbstract] + :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._abstracts = abstracts + self._state = state @property - def refs(self): - """Gets the refs of this ReleaseEntity. # noqa: E501 + def ident(self): + """Gets the ident of this ReleaseEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The refs of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseRef] + :return: The ident of this ReleaseEntity. # noqa: E501 + :rtype: str """ - return self._refs + return self._ident - @refs.setter - def refs(self, refs): - """Sets the refs of this ReleaseEntity. + @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 refs: The refs of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseRef] + :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._refs = refs + self._revision = revision @property - def contribs(self): - """Gets the contribs of this ReleaseEntity. # noqa: E501 + def redirect(self): + """Gets the redirect of this ReleaseEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The contribs of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseContrib] + :return: The redirect of this ReleaseEntity. # noqa: E501 + :rtype: str """ - return self._contribs + return self._redirect - @contribs.setter - def contribs(self, contribs): - """Sets the contribs of this ReleaseEntity. + @redirect.setter + def redirect(self, redirect): + """Sets the redirect of this ReleaseEntity. + base32-encoded unique identifier # noqa: E501 - :param contribs: The contribs of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseContrib] + :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._contribs = contribs + self._redirect = redirect @property - def license_slug(self): - """Gets the license_slug of this ReleaseEntity. # noqa: E501 + def extra(self): + """Gets the extra of this ReleaseEntity. # noqa: E501 - Short string (slug) name of license under which release is openly published (if applicable). # 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 license_slug of this ReleaseEntity. # noqa: E501 - :rtype: str + :return: The extra of this ReleaseEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._license_slug + return self._extra - @license_slug.setter - def license_slug(self, license_slug): - """Sets the license_slug of this ReleaseEntity. + @extra.setter + def extra(self, extra): + """Sets the extra of this ReleaseEntity. - Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501 + Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - :param license_slug: The license_slug of this ReleaseEntity. # noqa: E501 - :type: str + :param extra: The extra of this ReleaseEntity. # noqa: E501 + :type: dict(str, object) """ - self._license_slug = license_slug + self._extra = extra @property - def language(self): - """Gets the language of this ReleaseEntity. # noqa: E501 + def edit_extra(self): + """Gets the edit_extra 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 + Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - :return: The language of this ReleaseEntity. # noqa: E501 - :rtype: str + :return: The edit_extra of this ReleaseEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._language + return self._edit_extra - @language.setter - def language(self, language): - """Sets the language of this ReleaseEntity. + @edit_extra.setter + def edit_extra(self, edit_extra): + """Sets the edit_extra 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 + Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - :param language: The language of this ReleaseEntity. # noqa: E501 - :type: str + :param edit_extra: The edit_extra of this ReleaseEntity. # noqa: E501 + :type: dict(str, object) """ - self._language = language + self._edit_extra = edit_extra @property - def publisher(self): - """Gets the publisher of this ReleaseEntity. # noqa: E501 + def title(self): + """Gets the title 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 + 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 publisher of this ReleaseEntity. # noqa: E501 + :return: The title of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._publisher + return self._title - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this ReleaseEntity. + @title.setter + def title(self, title): + """Sets the title 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 + 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 publisher: The publisher of this ReleaseEntity. # noqa: E501 + :param title: The title of this ReleaseEntity. # noqa: E501 :type: str """ - self._publisher = publisher + self._title = title @property - def version(self): - """Gets the version of this ReleaseEntity. # noqa: E501 + def subtitle(self): + """Gets the subtitle 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 + 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 version of this ReleaseEntity. # noqa: E501 + :return: The subtitle of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._version + return self._subtitle - @version.setter - def version(self, version): - """Sets the version of this ReleaseEntity. + @subtitle.setter + def subtitle(self, subtitle): + """Sets the subtitle 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 + 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 version: The version of this ReleaseEntity. # noqa: E501 + :param subtitle: The subtitle of this ReleaseEntity. # noqa: E501 :type: str """ - self._version = version + self._subtitle = subtitle @property - def number(self): - """Gets the number of this ReleaseEntity. # noqa: E501 + def original_title(self): + """Gets the original_title 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 + Title in original language if `title` field has been translated. See guide for details. # noqa: E501 - :return: The number of this ReleaseEntity. # noqa: E501 + :return: The original_title of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._number + return self._original_title - @number.setter - def number(self, number): - """Sets the number of this ReleaseEntity. + @original_title.setter + def original_title(self, original_title): + """Sets the original_title of this ReleaseEntity. - For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501 + Title in original language if `title` field has been translated. See guide for details. # noqa: E501 - :param number: The number of this ReleaseEntity. # noqa: E501 + :param original_title: The original_title of this ReleaseEntity. # noqa: E501 :type: str """ - self._number = number + self._original_title = original_title @property - def pages(self): - """Gets the pages of this ReleaseEntity. # noqa: E501 + def work_id(self): + """Gets the work_id 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 + 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 pages of this ReleaseEntity. # noqa: E501 + :return: The work_id of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._pages + return self._work_id - @pages.setter - def pages(self, pages): - """Sets the pages of this ReleaseEntity. + @work_id.setter + def work_id(self, work_id): + """Sets the work_id 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 + 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 pages: The pages of this ReleaseEntity. # noqa: E501 + :param work_id: The work_id of this ReleaseEntity. # noqa: E501 :type: str """ - self._pages = pages + self._work_id = work_id @property - def issue(self): - """Gets the issue of this ReleaseEntity. # noqa: E501 + def container(self): + """Gets the container 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: The container of this ReleaseEntity. # noqa: E501 + :rtype: ContainerEntity """ - return self._issue + return self._container - @issue.setter - def issue(self, issue): - """Sets the issue of this ReleaseEntity. + @container.setter + def container(self, container): + """Sets the container 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 + :param container: The container of this ReleaseEntity. # noqa: E501 + :type: ContainerEntity """ - self._issue = issue + self._container = container @property - def volume(self): - """Gets the volume of this ReleaseEntity. # noqa: E501 + def files(self): + """Gets the files 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 + 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 volume of this ReleaseEntity. # noqa: E501 - :rtype: str + :return: The files of this ReleaseEntity. # noqa: E501 + :rtype: list[FileEntity] """ - return self._volume + return self._files - @volume.setter - def volume(self, volume): - """Sets the volume of this ReleaseEntity. + @files.setter + def files(self, files): + """Sets the files 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 + 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 volume: The volume of this ReleaseEntity. # noqa: E501 - :type: str + :param files: The files of this ReleaseEntity. # noqa: E501 + :type: list[FileEntity] """ - self._volume = volume + self._files = files @property - def ext_ids(self): - """Gets the ext_ids of this ReleaseEntity. # noqa: E501 + def filesets(self): + """Gets the filesets of this ReleaseEntity. # noqa: E501 - Set of external identifiers for this release. # 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 ext_ids of this ReleaseEntity. # noqa: E501 - :rtype: ReleaseExtIds + :return: The filesets of this ReleaseEntity. # noqa: E501 + :rtype: list[FilesetEntity] """ - return self._ext_ids + return self._filesets - @ext_ids.setter - def ext_ids(self, ext_ids): - """Sets the ext_ids of this ReleaseEntity. + @filesets.setter + def filesets(self, filesets): + """Sets the filesets of this ReleaseEntity. - Set of external identifiers for this release. # 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 - :param ext_ids: The ext_ids of this ReleaseEntity. # noqa: E501 - :type: ReleaseExtIds + :param filesets: The filesets of this ReleaseEntity. # noqa: E501 + :type: list[FilesetEntity] """ - if ext_ids is None: - raise ValueError("Invalid value for `ext_ids`, must not be `None`") # noqa: E501 - self._ext_ids = ext_ids + self._filesets = filesets - @property - def withdrawn_year(self): - """Gets the withdrawn_year of this ReleaseEntity. # noqa: E501 + @property + def webcaptures(self): + """Gets the webcaptures of this ReleaseEntity. # noqa: E501 - Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # 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 withdrawn_year of this ReleaseEntity. # noqa: E501 - :rtype: int + :return: The webcaptures of this ReleaseEntity. # noqa: E501 + :rtype: list[WebcaptureEntity] """ - return self._withdrawn_year + return self._webcaptures - @withdrawn_year.setter - def withdrawn_year(self, withdrawn_year): - """Sets the withdrawn_year of this ReleaseEntity. + @webcaptures.setter + def webcaptures(self, webcaptures): + """Sets the webcaptures of this ReleaseEntity. - Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # 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 - :param withdrawn_year: The withdrawn_year of this ReleaseEntity. # noqa: E501 - :type: int + :param webcaptures: The webcaptures of this ReleaseEntity. # noqa: E501 + :type: list[WebcaptureEntity] """ - self._withdrawn_year = withdrawn_year + self._webcaptures = webcaptures @property - def withdrawn_date(self): - """Gets the withdrawn_date of this ReleaseEntity. # noqa: E501 + def container_id(self): + """Gets the container_id of this ReleaseEntity. # noqa: E501 - Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 + Used to link this release to a container entity that the release was published as part of. # noqa: E501 - :return: The withdrawn_date of this ReleaseEntity. # noqa: E501 - :rtype: date + :return: The container_id of this ReleaseEntity. # noqa: E501 + :rtype: str """ - return self._withdrawn_date + return self._container_id - @withdrawn_date.setter - def withdrawn_date(self, withdrawn_date): - """Sets the withdrawn_date of this ReleaseEntity. + @container_id.setter + def container_id(self, container_id): + """Sets the container_id of this ReleaseEntity. - Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 + Used to link this release to a container entity that the release was published as part of. # noqa: E501 - :param withdrawn_date: The withdrawn_date of this ReleaseEntity. # noqa: E501 - :type: date + :param container_id: The container_id of this ReleaseEntity. # noqa: E501 + :type: str """ - self._withdrawn_date = withdrawn_date + self._container_id = container_id @property - def withdrawn_status(self): - """Gets the withdrawn_status of this ReleaseEntity. # noqa: E501 + def release_type(self): + """Gets the release_type 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 + \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501 - :return: The withdrawn_status of this ReleaseEntity. # noqa: E501 + :return: The release_type of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._withdrawn_status + return self._release_type - @withdrawn_status.setter - def withdrawn_status(self, withdrawn_status): - """Sets the withdrawn_status of this ReleaseEntity. + @release_type.setter + def release_type(self, release_type): + """Sets the release_type 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 + \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501 - :param withdrawn_status: The withdrawn_status of this ReleaseEntity. # noqa: E501 + :param release_type: The release_type of this ReleaseEntity. # noqa: E501 :type: str """ - self._withdrawn_status = withdrawn_status + self._release_type = release_type @property - def release_year(self): - """Gets the release_year of this ReleaseEntity. # noqa: E501 + def release_stage(self): + """Gets the release_stage 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 + The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501 - :return: The release_year of this ReleaseEntity. # noqa: E501 - :rtype: int + :return: The release_stage of this ReleaseEntity. # noqa: E501 + :rtype: str """ - return self._release_year + return self._release_stage - @release_year.setter - def release_year(self, release_year): - """Sets the release_year of this ReleaseEntity. + @release_stage.setter + def release_stage(self, release_stage): + """Sets the release_stage 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 + The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501 - :param release_year: The release_year of this ReleaseEntity. # noqa: E501 - :type: int + :param release_stage: The release_stage of this ReleaseEntity. # noqa: E501 + :type: str """ - self._release_year = release_year + self._release_stage = release_stage @property def release_date(self): @@ -608,423 +647,372 @@ class ReleaseEntity(object): self._release_date = release_date @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_type(self): - """Gets the release_type of this ReleaseEntity. # noqa: E501 + def release_year(self): + """Gets the release_year of this ReleaseEntity. # noqa: E501 - \"Type\" or \"medium\" that this release is published as. See guide for valid values. # 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_type of this ReleaseEntity. # noqa: E501 - :rtype: str + :return: The release_year of this ReleaseEntity. # noqa: E501 + :rtype: int """ - return self._release_type + return self._release_year - @release_type.setter - def release_type(self, release_type): - """Sets the release_type of this ReleaseEntity. + @release_year.setter + def release_year(self, release_year): + """Sets the release_year of this ReleaseEntity. - \"Type\" or \"medium\" that this release is published as. See guide for valid values. # 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 - :param release_type: The release_type of this ReleaseEntity. # noqa: E501 - :type: str + :param release_year: The release_year of this ReleaseEntity. # noqa: E501 + :type: int """ - self._release_type = release_type + self._release_year = release_year @property - def container_id(self): - """Gets the container_id of this ReleaseEntity. # noqa: E501 + def withdrawn_status(self): + """Gets the withdrawn_status of this ReleaseEntity. # noqa: E501 - Used to link this release to a container entity that the release was published as part of. # 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 container_id of this ReleaseEntity. # noqa: E501 + :return: The withdrawn_status of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._container_id + return self._withdrawn_status - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this ReleaseEntity. + @withdrawn_status.setter + def withdrawn_status(self, withdrawn_status): + """Sets the withdrawn_status of this ReleaseEntity. - Used to link this release to a container entity that the release was published as part of. # 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 - :param container_id: The container_id of this ReleaseEntity. # noqa: E501 + :param withdrawn_status: The withdrawn_status of this ReleaseEntity. # noqa: E501 :type: str """ - self._container_id = container_id + self._withdrawn_status = withdrawn_status @property - def webcaptures(self): - """Gets the webcaptures of this ReleaseEntity. # noqa: E501 + def withdrawn_date(self): + """Gets the withdrawn_date 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 + Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 - :return: The webcaptures of this ReleaseEntity. # noqa: E501 - :rtype: list[WebcaptureEntity] + :return: The withdrawn_date of this ReleaseEntity. # noqa: E501 + :rtype: date """ - return self._webcaptures + return self._withdrawn_date - @webcaptures.setter - def webcaptures(self, webcaptures): - """Sets the webcaptures of this ReleaseEntity. + @withdrawn_date.setter + def withdrawn_date(self, withdrawn_date): + """Sets the withdrawn_date 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 + Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 - :param webcaptures: The webcaptures of this ReleaseEntity. # noqa: E501 - :type: list[WebcaptureEntity] + :param withdrawn_date: The withdrawn_date of this ReleaseEntity. # noqa: E501 + :type: date """ - self._webcaptures = webcaptures + self._withdrawn_date = withdrawn_date @property - def filesets(self): - """Gets the filesets of this ReleaseEntity. # noqa: E501 + def withdrawn_year(self): + """Gets the withdrawn_year 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 + Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501 - :return: The filesets of this ReleaseEntity. # noqa: E501 - :rtype: list[FilesetEntity] + :return: The withdrawn_year of this ReleaseEntity. # noqa: E501 + :rtype: int """ - return self._filesets + return self._withdrawn_year - @filesets.setter - def filesets(self, filesets): - """Sets the filesets of this ReleaseEntity. + @withdrawn_year.setter + def withdrawn_year(self, withdrawn_year): + """Sets the withdrawn_year 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 + Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501 - :param filesets: The filesets of this ReleaseEntity. # noqa: E501 - :type: list[FilesetEntity] + :param withdrawn_year: The withdrawn_year of this ReleaseEntity. # noqa: E501 + :type: int """ - self._filesets = filesets + self._withdrawn_year = withdrawn_year @property - def files(self): - """Gets the files of this ReleaseEntity. # noqa: E501 + def ext_ids(self): + """Gets the ext_ids 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: The ext_ids of this ReleaseEntity. # noqa: E501 + :rtype: ReleaseExtIds """ - return self._files + return self._ext_ids - @files.setter - def files(self, files): - """Sets the files of this ReleaseEntity. + @ext_ids.setter + def ext_ids(self, ext_ids): + """Sets the ext_ids 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] + :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._files = files + self._ext_ids = ext_ids @property - def container(self): - """Gets the container of this ReleaseEntity. # noqa: E501 - - Complete container entity identified by `container_id` field. Only included in GET reponses when `container` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 + def volume(self): + """Gets the volume of this ReleaseEntity. # noqa: E501 - :return: The container of this ReleaseEntity. # noqa: E501 - :rtype: ContainerEntity + 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._container + return self._volume - @container.setter - def container(self, container): - """Sets the container of this ReleaseEntity. + @volume.setter + def volume(self, volume): + """Sets the volume of this ReleaseEntity. - Complete container entity identified by `container_id` field. Only included in GET reponses when `container` included in `expand` parameter; ignored in PUT or POST requests. # 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 - :param container: The container of this ReleaseEntity. # noqa: E501 - :type: ContainerEntity + :param volume: The volume of this ReleaseEntity. # noqa: E501 + :type: str """ - self._container = container + self._volume = volume @property - def work_id(self): - """Gets the work_id of this ReleaseEntity. # noqa: E501 + def issue(self): + """Gets the issue 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 + 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 work_id of this ReleaseEntity. # noqa: E501 + :return: The issue of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._work_id + return self._issue - @work_id.setter - def work_id(self, work_id): - """Sets the work_id of this ReleaseEntity. + @issue.setter + def issue(self, issue): + """Sets the issue 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 + 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 work_id: The work_id of this ReleaseEntity. # noqa: E501 + :param issue: The issue of this ReleaseEntity. # noqa: E501 :type: str """ - self._work_id = work_id + self._issue = issue @property - def original_title(self): - """Gets the original_title of this ReleaseEntity. # noqa: E501 + def pages(self): + """Gets the pages of this ReleaseEntity. # noqa: E501 - Title in original language if `title` field has been translated. See guide for details. # 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 original_title of this ReleaseEntity. # noqa: E501 + :return: The pages of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._original_title + return self._pages - @original_title.setter - def original_title(self, original_title): - """Sets the original_title of this ReleaseEntity. + @pages.setter + def pages(self, pages): + """Sets the pages of this ReleaseEntity. - Title in original language if `title` field has been translated. See guide for details. # noqa: E501 + Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. # noqa: E501 - :param original_title: The original_title of this ReleaseEntity. # noqa: E501 + :param pages: The pages of this ReleaseEntity. # noqa: E501 :type: str """ - self._original_title = original_title + self._pages = pages @property - def subtitle(self): - """Gets the subtitle of this ReleaseEntity. # noqa: E501 + def number(self): + """Gets the number 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 + For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501 - :return: The subtitle of this ReleaseEntity. # noqa: E501 + :return: The number of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._subtitle + return self._number - @subtitle.setter - def subtitle(self, subtitle): - """Sets the subtitle of this ReleaseEntity. + @number.setter + def number(self, number): + """Sets the number 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 + For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501 - :param subtitle: The subtitle of this ReleaseEntity. # noqa: E501 + :param number: The number of this ReleaseEntity. # noqa: E501 :type: str """ - self._subtitle = subtitle + self._number = number @property - def title(self): - """Gets the title of this ReleaseEntity. # noqa: E501 + def version(self): + """Gets the version 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 + For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501 - :return: The title of this ReleaseEntity. # noqa: E501 + :return: The version of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._title + return self._version - @title.setter - def title(self, title): - """Sets the title of this ReleaseEntity. + @version.setter + def version(self, version): + """Sets the version 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 + For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501 - :param title: The title of this ReleaseEntity. # noqa: E501 + :param version: The version of this ReleaseEntity. # noqa: E501 :type: str """ - self._title = title + self._version = version @property - def state(self): - """Gets the state of this ReleaseEntity. # noqa: E501 + 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 state of this ReleaseEntity. # noqa: E501 + :return: The publisher of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._state + return self._publisher - @state.setter - def state(self, state): - """Sets the state of this ReleaseEntity. + @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 state: The state of this ReleaseEntity. # noqa: E501 + :param publisher: The publisher 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 + self._publisher = publisher @property - def ident(self): - """Gets the ident of this ReleaseEntity. # noqa: E501 + def language(self): + """Gets the language of this ReleaseEntity. # noqa: E501 - base32-encoded unique identifier # 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 ident of this ReleaseEntity. # noqa: E501 + :return: The language of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._ident + return self._language - @ident.setter - def ident(self, ident): - """Sets the ident of this ReleaseEntity. + @language.setter + def language(self, language): + """Sets the language of this ReleaseEntity. - base32-encoded unique identifier # 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 - :param ident: The ident of this ReleaseEntity. # noqa: E501 + :param language: The language 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._ident = ident + self._language = language @property - def revision(self): - """Gets the revision of this ReleaseEntity. # noqa: E501 + def license_slug(self): + """Gets the license_slug of this ReleaseEntity. # noqa: E501 - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501 - :return: The revision of this ReleaseEntity. # noqa: E501 + :return: The license_slug of this ReleaseEntity. # noqa: E501 :rtype: str """ - return self._revision + return self._license_slug - @revision.setter - def revision(self, revision): - """Sets the revision of this ReleaseEntity. + @license_slug.setter + def license_slug(self, license_slug): + """Sets the license_slug of this ReleaseEntity. - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501 - :param revision: The revision of this ReleaseEntity. # noqa: E501 + :param license_slug: The license_slug 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('[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("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 + self._license_slug = license_slug @property - def redirect(self): - """Gets the redirect of this ReleaseEntity. # noqa: E501 + def contribs(self): + """Gets the contribs of this ReleaseEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 - :return: The redirect of this ReleaseEntity. # noqa: E501 - :rtype: str + :return: The contribs of this ReleaseEntity. # noqa: E501 + :rtype: list[ReleaseContrib] """ - return self._redirect + return self._contribs - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this ReleaseEntity. + @contribs.setter + def contribs(self, contribs): + """Sets the contribs of this ReleaseEntity. - base32-encoded unique identifier # noqa: E501 - :param redirect: The redirect of this ReleaseEntity. # noqa: E501 - :type: str + :param contribs: The contribs of this ReleaseEntity. # noqa: E501 + :type: list[ReleaseContrib] """ - 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._redirect = redirect + self._contribs = contribs @property - def extra(self): - """Gets the extra of this ReleaseEntity. # noqa: E501 + def refs(self): + """Gets the refs 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: object + :return: The refs of this ReleaseEntity. # noqa: E501 + :rtype: list[ReleaseRef] """ - return self._extra + return self._refs - @extra.setter - def extra(self, extra): - """Sets the extra of this ReleaseEntity. + @refs.setter + def refs(self, refs): + """Sets the refs 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: object + :param refs: The refs of this ReleaseEntity. # noqa: E501 + :type: list[ReleaseRef] """ - self._extra = extra + self._refs = refs @property - def edit_extra(self): - """Gets the edit_extra of this ReleaseEntity. # noqa: E501 + def abstracts(self): + """Gets the abstracts 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: object + :return: The abstracts of this ReleaseEntity. # noqa: E501 + :rtype: list[ReleaseAbstract] """ - return self._edit_extra + return self._abstracts - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this ReleaseEntity. + @abstracts.setter + def abstracts(self, abstracts): + """Sets the abstracts 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: object + :param abstracts: The abstracts of this ReleaseEntity. # noqa: E501 + :type: list[ReleaseAbstract] """ - self._edit_extra = edit_extra + self._abstracts = abstracts def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 3b0e3e70..c986e1fe 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class ReleaseExtIds(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'doi': 'str', 'wikidata_qid': 'str', 'isbn13': 'str', @@ -57,7 +58,7 @@ class ReleaseExtIds(object): } def __init__(self, doi=None, wikidata_qid=None, isbn13=None, pmid=None, pmcid=None, core=None, arxiv=None, jstor=None, ark=None, mag=None): # noqa: E501 - """ReleaseExtIds - a model defined in Swagger""" # noqa: E501 + """ReleaseExtIds - a model defined in OpenAPI""" # noqa: E501 self._doi = None self._wikidata_qid = None @@ -326,7 +327,7 @@ class ReleaseExtIds(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/release_ref.py b/python_openapi_client/fatcat_openapi_client/models/release_ref.py index 42131973..1fd5288d 100644 --- a/python_openapi_client/fatcat_openapi_client/models/release_ref.py +++ b/python_openapi_client/fatcat_openapi_client/models/release_ref.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,22 +18,23 @@ import six class ReleaseRef(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'index': 'int', 'target_release_id': 'str', - 'extra': 'object', + 'extra': 'dict(str, object)', 'key': 'str', 'year': 'int', 'container_name': 'str', @@ -53,7 +54,7 @@ class ReleaseRef(object): } 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 Swagger""" # noqa: E501 + """ReleaseRef - a model defined in OpenAPI""" # noqa: E501 self._index = None self._target_release_id = None @@ -129,8 +130,8 @@ class ReleaseRef(object): 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('[a-zA-Z2-7]{26}', target_release_id): # noqa: E501 - raise ValueError("Invalid value for `target_release_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{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 @@ -141,7 +142,7 @@ class ReleaseRef(object): 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: object + :rtype: dict(str, object) """ return self._extra @@ -152,7 +153,7 @@ class ReleaseRef(object): 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: object + :type: dict(str, object) """ self._extra = extra @@ -276,7 +277,7 @@ class ReleaseRef(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/success.py b/python_openapi_client/fatcat_openapi_client/models/success.py index 1e7a3f6c..7313d652 100644 --- a/python_openapi_client/fatcat_openapi_client/models/success.py +++ b/python_openapi_client/fatcat_openapi_client/models/success.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class Success(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'success': 'bool', 'message': 'str' } @@ -41,7 +42,7 @@ class Success(object): } def __init__(self, success=None, message=None): # noqa: E501 - """Success - a model defined in Swagger""" # noqa: E501 + """Success - a model defined in OpenAPI""" # noqa: E501 self._success = None self._message = None @@ -100,7 +101,7 @@ class Success(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 8a0957b2..1a021d9b 100644 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity # noqa: F401,E501 - class WebcaptureAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[WebcaptureEntity]' } @@ -44,7 +42,7 @@ class WebcaptureAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """WebcaptureAutoBatch - a model defined in Swagger""" # noqa: E501 + """WebcaptureAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class WebcaptureAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 85ed0aec..7787c0c4 100644 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py +++ b/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class WebcaptureCdxLine(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'surt': 'str', 'timestamp': 'datetime', 'url': 'str', @@ -53,7 +54,7 @@ class WebcaptureCdxLine(object): } 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 Swagger""" # noqa: E501 + """WebcaptureCdxLine - a model defined in OpenAPI""" # noqa: E501 self._surt = None self._timestamp = None @@ -248,8 +249,8 @@ class WebcaptureCdxLine(object): 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('[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -277,8 +278,8 @@ class WebcaptureCdxLine(object): 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('[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{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 @@ -286,7 +287,7 @@ class WebcaptureCdxLine(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py index 642d156d..82363c23 100644 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,228 +16,229 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.webcapture_cdx_line import WebcaptureCdxLine # noqa: F401,E501 -from fatcat_openapi_client.models.webcapture_url import WebcaptureUrl # noqa: F401,E501 - class WebcaptureEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'releases': 'list[ReleaseEntity]', - 'release_ids': 'list[str]', - 'timestamp': 'datetime', - 'original_url': 'str', - 'archive_urls': 'list[WebcaptureUrl]', - 'cdx': 'list[WebcaptureCdxLine]', - 'edit_extra': 'object', - 'extra': 'object', - 'redirect': 'str', - 'revision': 'str', + openapi_types = { + 'state': 'str', 'ident': 'str', - 'state': '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', + 'release_ids': 'list[str]', + 'releases': 'list[ReleaseEntity]' } attribute_map = { - 'releases': 'releases', - 'release_ids': 'release_ids', - 'timestamp': 'timestamp', - 'original_url': 'original_url', - 'archive_urls': 'archive_urls', - 'cdx': 'cdx', - 'edit_extra': 'edit_extra', - 'extra': 'extra', - 'redirect': 'redirect', - 'revision': 'revision', + 'state': 'state', 'ident': 'ident', - 'state': 'state' + 'revision': 'revision', + 'redirect': 'redirect', + 'extra': 'extra', + 'edit_extra': 'edit_extra', + 'cdx': 'cdx', + 'archive_urls': 'archive_urls', + 'original_url': 'original_url', + 'timestamp': 'timestamp', + 'release_ids': 'release_ids', + 'releases': 'releases' } - def __init__(self, releases=None, release_ids=None, timestamp=None, original_url=None, archive_urls=None, cdx=None, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 - """WebcaptureEntity - a model defined in Swagger""" # noqa: E501 + 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, release_ids=None, releases=None): # noqa: E501 + """WebcaptureEntity - a model defined in OpenAPI""" # noqa: E501 - self._releases = None - self._release_ids = None - self._timestamp = None - self._original_url = None - self._archive_urls = None - self._cdx = None - self._edit_extra = None - self._extra = None - self._redirect = None - self._revision = None - self._ident = None 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._release_ids = None + self._releases = None self.discriminator = None - if releases is not None: - self.releases = releases - if release_ids is not None: - self.release_ids = release_ids - if timestamp is not None: - self.timestamp = timestamp - if original_url is not None: - self.original_url = original_url - if archive_urls is not None: - self.archive_urls = archive_urls - if cdx is not None: - self.cdx = cdx - if edit_extra is not None: - self.edit_extra = edit_extra - if extra is not None: - self.extra = extra - if redirect is not None: - self.redirect = redirect - if revision is not None: - self.revision = revision - if ident is not None: - self.ident = ident 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 release_ids is not None: + self.release_ids = release_ids + if releases is not None: + self.releases = releases @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 - - @property - def release_ids(self): - """Gets the release_ids of this WebcaptureEntity. # noqa: E501 + def state(self): + """Gets the state 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: The state of this WebcaptureEntity. # noqa: E501 + :rtype: str """ - return self._release_ids + return self._state - @release_ids.setter - def release_ids(self, release_ids): - """Sets the release_ids of this WebcaptureEntity. + @state.setter + def state(self, state): + """Sets the state 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] + :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._release_ids = release_ids + self._state = state @property - def timestamp(self): - """Gets the timestamp of this WebcaptureEntity. # noqa: E501 + def ident(self): + """Gets the ident 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 + base32-encoded unique identifier # noqa: E501 - :return: The timestamp of this WebcaptureEntity. # noqa: E501 - :rtype: datetime + :return: The ident of this WebcaptureEntity. # noqa: E501 + :rtype: str """ - return self._timestamp + return self._ident - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this WebcaptureEntity. + @ident.setter + def ident(self, ident): + """Sets the ident 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 + base32-encoded unique identifier # noqa: E501 - :param timestamp: The timestamp of this WebcaptureEntity. # noqa: E501 - :type: datetime + :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._timestamp = timestamp + self._ident = ident @property - def original_url(self): - """Gets the original_url of this WebcaptureEntity. # noqa: E501 + def revision(self): + """Gets the revision of this WebcaptureEntity. # noqa: E501 - Base URL of the primary resource this is a capture of # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :return: The original_url of this WebcaptureEntity. # noqa: E501 + :return: The revision of this WebcaptureEntity. # noqa: E501 :rtype: str """ - return self._original_url + return self._revision - @original_url.setter - def original_url(self, original_url): - """Sets the original_url of this WebcaptureEntity. + @revision.setter + def revision(self, revision): + """Sets the revision of this WebcaptureEntity. - Base URL of the primary resource this is a capture of # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - :param original_url: The original_url of this WebcaptureEntity. # 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._original_url = original_url + self._revision = revision @property - def archive_urls(self): - """Gets the archive_urls of this WebcaptureEntity. # noqa: E501 + def redirect(self): + """Gets the redirect of this WebcaptureEntity. # noqa: E501 + base32-encoded unique identifier # noqa: E501 - :return: The archive_urls of this WebcaptureEntity. # noqa: E501 - :rtype: list[WebcaptureUrl] + :return: The redirect of this WebcaptureEntity. # noqa: E501 + :rtype: str """ - return self._archive_urls + return self._redirect - @archive_urls.setter - def archive_urls(self, archive_urls): - """Sets the archive_urls of this WebcaptureEntity. + @redirect.setter + def redirect(self, redirect): + """Sets the redirect of this WebcaptureEntity. + base32-encoded unique identifier # noqa: E501 - :param archive_urls: The archive_urls of this WebcaptureEntity. # noqa: E501 - :type: list[WebcaptureUrl] + :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._archive_urls = archive_urls + self._redirect = redirect @property - def cdx(self): - """Gets the cdx of this WebcaptureEntity. # noqa: E501 + 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 cdx of this WebcaptureEntity. # noqa: E501 - :rtype: list[WebcaptureCdxLine] + :return: The extra of this WebcaptureEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._cdx + return self._extra - @cdx.setter - def cdx(self, cdx): - """Sets the cdx of this WebcaptureEntity. + @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 cdx: The cdx of this WebcaptureEntity. # noqa: E501 - :type: list[WebcaptureCdxLine] + :param extra: The extra of this WebcaptureEntity. # noqa: E501 + :type: dict(str, object) """ - self._cdx = cdx + self._extra = extra @property def edit_extra(self): @@ -246,7 +247,7 @@ class WebcaptureEntity(object): 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: object + :rtype: dict(str, object) """ return self._edit_extra @@ -257,153 +258,150 @@ class WebcaptureEntity(object): 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: object + :type: dict(str, object) """ self._edit_extra = edit_extra @property - def extra(self): - """Gets the extra of this WebcaptureEntity. # noqa: E501 + def cdx(self): + """Gets the cdx 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: object + :return: The cdx of this WebcaptureEntity. # noqa: E501 + :rtype: list[WebcaptureCdxLine] """ - return self._extra + return self._cdx - @extra.setter - def extra(self, extra): - """Sets the extra of this WebcaptureEntity. + @cdx.setter + def cdx(self, cdx): + """Sets the cdx 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: object + :param cdx: The cdx of this WebcaptureEntity. # noqa: E501 + :type: list[WebcaptureCdxLine] """ - self._extra = extra + self._cdx = cdx @property - def redirect(self): - """Gets the redirect of this WebcaptureEntity. # noqa: E501 + def archive_urls(self): + """Gets the archive_urls of this WebcaptureEntity. # noqa: E501 - base32-encoded unique identifier # noqa: E501 - :return: The redirect of this WebcaptureEntity. # noqa: E501 - :rtype: str + :return: The archive_urls of this WebcaptureEntity. # noqa: E501 + :rtype: list[WebcaptureUrl] """ - return self._redirect + return self._archive_urls - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this WebcaptureEntity. + @archive_urls.setter + def archive_urls(self, archive_urls): + """Sets the archive_urls of this WebcaptureEntity. - base32-encoded unique identifier # noqa: E501 - :param redirect: The redirect of this WebcaptureEntity. # noqa: E501 - :type: str + :param archive_urls: The archive_urls of this WebcaptureEntity. # noqa: E501 + :type: list[WebcaptureUrl] """ - 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._redirect = redirect + self._archive_urls = archive_urls @property - def revision(self): - """Gets the revision of this WebcaptureEntity. # noqa: E501 + def original_url(self): + """Gets the original_url of this WebcaptureEntity. # noqa: E501 - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Base URL of the primary resource this is a capture of # noqa: E501 - :return: The revision of this WebcaptureEntity. # noqa: E501 + :return: The original_url of this WebcaptureEntity. # noqa: E501 :rtype: str """ - return self._revision + return self._original_url - @revision.setter - def revision(self, revision): - """Sets the revision of this WebcaptureEntity. + @original_url.setter + def original_url(self, original_url): + """Sets the original_url of this WebcaptureEntity. - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 + Base URL of the primary resource this is a capture of # noqa: E501 - :param revision: The revision of this WebcaptureEntity. # noqa: E501 + :param original_url: The original_url 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('[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("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 + self._original_url = original_url @property - def ident(self): - """Gets the ident of this WebcaptureEntity. # noqa: E501 + def timestamp(self): + """Gets the timestamp of this WebcaptureEntity. # noqa: E501 - base32-encoded unique identifier # 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 ident of this WebcaptureEntity. # noqa: E501 - :rtype: str + :return: The timestamp of this WebcaptureEntity. # noqa: E501 + :rtype: datetime """ - return self._ident + return self._timestamp - @ident.setter - def ident(self, ident): - """Sets the ident of this WebcaptureEntity. + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this WebcaptureEntity. - base32-encoded unique identifier # 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 - :param ident: The ident of this WebcaptureEntity. # noqa: E501 - :type: str + :param timestamp: The timestamp of this WebcaptureEntity. # noqa: E501 + :type: datetime """ - 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - self._ident = ident + self._timestamp = timestamp @property - def state(self): - """Gets the state of this WebcaptureEntity. # noqa: E501 + 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 state of this WebcaptureEntity. # noqa: E501 - :rtype: str + :return: The release_ids of this WebcaptureEntity. # noqa: E501 + :rtype: list[str] """ - return self._state + return self._release_ids - @state.setter - def state(self, state): - """Sets the state of this WebcaptureEntity. + @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 state: The state of this WebcaptureEntity. # noqa: E501 - :type: str + :param release_ids: The release_ids of this WebcaptureEntity. # noqa: E501 + :type: list[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 + 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.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py index 881263bf..f9740c61 100644 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py +++ b/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +18,20 @@ import six class WebcaptureUrl(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'url': 'str', 'rel': 'str' } @@ -41,7 +42,7 @@ class WebcaptureUrl(object): } def __init__(self, url=None, rel=None): # noqa: E501 - """WebcaptureUrl - a model defined in Swagger""" # noqa: E501 + """WebcaptureUrl - a model defined in OpenAPI""" # noqa: E501 self._url = None self._rel = None @@ -104,7 +105,7 @@ class WebcaptureUrl(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( 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 index 475cf379..b403c850 100644 --- a/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py +++ b/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,24 +16,22 @@ import re # noqa: F401 import six -from fatcat_openapi_client.models.editgroup import Editgroup # noqa: F401,E501 -from fatcat_openapi_client.models.work_entity import WorkEntity # noqa: F401,E501 - class WorkAutoBatch(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { + openapi_types = { 'editgroup': 'Editgroup', 'entity_list': 'list[WorkEntity]' } @@ -44,7 +42,7 @@ class WorkAutoBatch(object): } def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """WorkAutoBatch - a model defined in Swagger""" # noqa: E501 + """WorkAutoBatch - a model defined in OpenAPI""" # noqa: E501 self._editgroup = None self._entity_list = None @@ -103,7 +101,7 @@ class WorkAutoBatch(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/models/work_entity.py b/python_openapi_client/fatcat_openapi_client/models/work_entity.py index 4ddcf7a5..25f81e96 100644 --- a/python_openapi_client/fatcat_openapi_client/models/work_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/work_entity.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,134 +18,116 @@ import six class WorkEntity(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + 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. """ - swagger_types = { - 'edit_extra': 'object', - 'extra': 'object', - 'redirect': 'str', - 'revision': 'str', + openapi_types = { + 'state': 'str', 'ident': 'str', - 'state': 'str' + 'revision': 'str', + 'redirect': 'str', + 'extra': 'dict(str, object)', + 'edit_extra': 'dict(str, object)' } attribute_map = { - 'edit_extra': 'edit_extra', - 'extra': 'extra', - 'redirect': 'redirect', - 'revision': 'revision', + 'state': 'state', 'ident': 'ident', - 'state': 'state' + 'revision': 'revision', + 'redirect': 'redirect', + 'extra': 'extra', + 'edit_extra': 'edit_extra' } - def __init__(self, edit_extra=None, extra=None, redirect=None, revision=None, ident=None, state=None): # noqa: E501 - """WorkEntity - a model defined in Swagger""" # noqa: E501 + 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._edit_extra = None - self._extra = None - self._redirect = None - self._revision = None - self._ident = None self._state = None + self._ident = None + self._revision = None + self._redirect = None + self._extra = None + self._edit_extra = None self.discriminator = None - if edit_extra is not None: - self.edit_extra = edit_extra - if extra is not None: - self.extra = extra - if redirect is not None: - self.redirect = redirect - if revision is not None: - self.revision = revision - if ident is not None: - self.ident = ident 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 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: 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: object - """ - - self._edit_extra = edit_extra - - @property - def extra(self): - """Gets the extra of this WorkEntity. # noqa: E501 + def state(self): + """Gets the state 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: object + :return: The state of this WorkEntity. # noqa: E501 + :rtype: str """ - return self._extra + return self._state - @extra.setter - def extra(self, extra): - """Sets the extra of this WorkEntity. + @state.setter + def state(self, state): + """Sets the state 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: object + :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._extra = extra + self._state = state @property - def redirect(self): - """Gets the redirect of this WorkEntity. # noqa: E501 + def ident(self): + """Gets the ident of this WorkEntity. # noqa: E501 base32-encoded unique identifier # noqa: E501 - :return: The redirect of this WorkEntity. # noqa: E501 + :return: The ident of this WorkEntity. # noqa: E501 :rtype: str """ - return self._redirect + return self._ident - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this WorkEntity. + @ident.setter + def ident(self, ident): + """Sets the ident of this WorkEntity. base32-encoded unique identifier # noqa: E501 - :param redirect: The redirect of this WorkEntity. # noqa: E501 + :param ident: The ident 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('[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError("Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # 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._redirect = redirect + self._ident = ident @property def revision(self): @@ -171,72 +153,91 @@ class WorkEntity(object): 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('[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("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 + 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 ident(self): - """Gets the ident of this WorkEntity. # noqa: E501 + def redirect(self): + """Gets the redirect of this WorkEntity. # noqa: E501 base32-encoded unique identifier # noqa: E501 - :return: The ident of this WorkEntity. # noqa: E501 + :return: The redirect of this WorkEntity. # noqa: E501 :rtype: str """ - return self._ident + return self._redirect - @ident.setter - def ident(self, ident): - """Sets the ident of this WorkEntity. + @redirect.setter + def redirect(self, redirect): + """Sets the redirect of this WorkEntity. base32-encoded unique identifier # noqa: E501 - :param ident: The ident of this WorkEntity. # noqa: E501 + :param redirect: The redirect 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + 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._ident = ident + self._redirect = redirect @property - def state(self): - """Gets the state of this WorkEntity. # noqa: E501 + 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 state of this WorkEntity. # noqa: E501 - :rtype: str + :return: The extra of this WorkEntity. # noqa: E501 + :rtype: dict(str, object) """ - return self._state + return self._extra - @state.setter - def state(self, state): - """Sets the state of this WorkEntity. + @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 state: The state of this WorkEntity. # noqa: E501 - :type: str + :param extra: The extra of this WorkEntity. # noqa: E501 + :type: dict(str, object) """ - 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 + 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.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/python_openapi_client/fatcat_openapi_client/rest.py b/python_openapi_client/fatcat_openapi_client/rest.py index a0eb1187..d049b537 100644 --- a/python_openapi_client/fatcat_openapi_client/rest.py +++ b/python_openapi_client/fatcat_openapi_client/rest.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -23,11 +23,9 @@ import certifi # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode +import urllib3 -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') +from fatcat_openapi_client.exceptions import ApiException, ApiValueError logger = logging.getLogger(__name__) @@ -76,6 +74,9 @@ class RESTClientObject(object): if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize @@ -92,6 +93,7 @@ class RESTClientObject(object): cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, **addition_pool_args ) else: @@ -131,7 +133,7 @@ class RESTClientObject(object): 'PATCH', 'OPTIONS'] if post_params and body: - raise ValueError( + raise ApiValueError( "body parameter cannot be used with post_params parameter." ) @@ -188,7 +190,7 @@ class RESTClientObject(object): # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form - elif isinstance(body, str): + elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( method, url, @@ -293,31 +295,3 @@ class RESTClientObject(object): _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message -- cgit v1.2.3