diff options
Diffstat (limited to 'python_openapi_client/fatcat_openapi_client/models')
36 files changed, 43 insertions, 9759 deletions
diff --git a/python_openapi_client/fatcat_openapi_client/models/__init__.py b/python_openapi_client/fatcat_openapi_client/models/__init__.py index 10b80063..1b5deada 100644 --- a/python_openapi_client/fatcat_openapi_client/models/__init__.py +++ b/python_openapi_client/fatcat_openapi_client/models/__init__.py @@ -1,52 +1,46 @@ -# coding: utf-8 - # flake8: noqa -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from fatcat_openapi_client.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) -# import models into model package -from fatcat_openapi_client.models.auth_oidc import AuthOidc -from fatcat_openapi_client.models.auth_oidc_result import AuthOidcResult -from fatcat_openapi_client.models.auth_token_result import AuthTokenResult -from fatcat_openapi_client.models.changelog_entry import ChangelogEntry -from fatcat_openapi_client.models.container_auto_batch import ContainerAutoBatch -from fatcat_openapi_client.models.container_entity import ContainerEntity -from fatcat_openapi_client.models.creator_auto_batch import CreatorAutoBatch -from fatcat_openapi_client.models.creator_entity import CreatorEntity -from fatcat_openapi_client.models.editgroup import Editgroup -from fatcat_openapi_client.models.editgroup_annotation import EditgroupAnnotation -from fatcat_openapi_client.models.editgroup_edits import EditgroupEdits -from fatcat_openapi_client.models.editor import Editor -from fatcat_openapi_client.models.entity_edit import EntityEdit -from fatcat_openapi_client.models.entity_history_entry import EntityHistoryEntry -from fatcat_openapi_client.models.error_response import ErrorResponse -from fatcat_openapi_client.models.file_auto_batch import FileAutoBatch -from fatcat_openapi_client.models.file_entity import FileEntity -from fatcat_openapi_client.models.file_url import FileUrl -from fatcat_openapi_client.models.fileset_auto_batch import FilesetAutoBatch -from fatcat_openapi_client.models.fileset_entity import FilesetEntity -from fatcat_openapi_client.models.fileset_file import FilesetFile -from fatcat_openapi_client.models.fileset_url import FilesetUrl -from fatcat_openapi_client.models.release_abstract import ReleaseAbstract -from fatcat_openapi_client.models.release_auto_batch import ReleaseAutoBatch -from fatcat_openapi_client.models.release_contrib import ReleaseContrib -from fatcat_openapi_client.models.release_entity import ReleaseEntity -from fatcat_openapi_client.models.release_ext_ids import ReleaseExtIds -from fatcat_openapi_client.models.release_ref import ReleaseRef -from fatcat_openapi_client.models.success import Success -from fatcat_openapi_client.models.webcapture_auto_batch import WebcaptureAutoBatch -from fatcat_openapi_client.models.webcapture_cdx_line import WebcaptureCdxLine -from fatcat_openapi_client.models.webcapture_entity import WebcaptureEntity -from fatcat_openapi_client.models.webcapture_url import WebcaptureUrl -from fatcat_openapi_client.models.work_auto_batch import WorkAutoBatch -from fatcat_openapi_client.models.work_entity import WorkEntity +from fatcat_openapi_client.model.auth_oidc import AuthOidc +from fatcat_openapi_client.model.auth_oidc_result import AuthOidcResult +from fatcat_openapi_client.model.auth_token_result import AuthTokenResult +from fatcat_openapi_client.model.changelog_entry import ChangelogEntry +from fatcat_openapi_client.model.container_auto_batch import ContainerAutoBatch +from fatcat_openapi_client.model.container_entity import ContainerEntity +from fatcat_openapi_client.model.creator_auto_batch import CreatorAutoBatch +from fatcat_openapi_client.model.creator_entity import CreatorEntity +from fatcat_openapi_client.model.editgroup import Editgroup +from fatcat_openapi_client.model.editgroup_annotation import EditgroupAnnotation +from fatcat_openapi_client.model.editgroup_edits import EditgroupEdits +from fatcat_openapi_client.model.editor import Editor +from fatcat_openapi_client.model.entity_edit import EntityEdit +from fatcat_openapi_client.model.entity_history_entry import EntityHistoryEntry +from fatcat_openapi_client.model.error_response import ErrorResponse +from fatcat_openapi_client.model.file_auto_batch import FileAutoBatch +from fatcat_openapi_client.model.file_entity import FileEntity +from fatcat_openapi_client.model.file_url import FileUrl +from fatcat_openapi_client.model.fileset_auto_batch import FilesetAutoBatch +from fatcat_openapi_client.model.fileset_entity import FilesetEntity +from fatcat_openapi_client.model.fileset_file import FilesetFile +from fatcat_openapi_client.model.fileset_url import FilesetUrl +from fatcat_openapi_client.model.release_abstract import ReleaseAbstract +from fatcat_openapi_client.model.release_auto_batch import ReleaseAutoBatch +from fatcat_openapi_client.model.release_contrib import ReleaseContrib +from fatcat_openapi_client.model.release_entity import ReleaseEntity +from fatcat_openapi_client.model.release_ext_ids import ReleaseExtIds +from fatcat_openapi_client.model.release_ref import ReleaseRef +from fatcat_openapi_client.model.success import Success +from fatcat_openapi_client.model.webcapture_auto_batch import WebcaptureAutoBatch +from fatcat_openapi_client.model.webcapture_cdx_line import WebcaptureCdxLine +from fatcat_openapi_client.model.webcapture_entity import WebcaptureEntity +from fatcat_openapi_client.model.webcapture_url import WebcaptureUrl +from fatcat_openapi_client.model.work_auto_batch import WorkAutoBatch +from fatcat_openapi_client.model.work_entity import WorkEntity diff --git a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py b/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py deleted file mode 100644 index 7b1da81b..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class AuthOidc(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'provider': 'str', - 'sub': 'str', - 'iss': 'str', - 'preferred_username': 'str' - } - - attribute_map = { - 'provider': 'provider', - 'sub': 'sub', - 'iss': 'iss', - 'preferred_username': 'preferred_username' - } - - def __init__(self, provider=None, sub=None, iss=None, preferred_username=None): # noqa: E501 - """AuthOidc - a model defined in OpenAPI""" # noqa: E501 - - self._provider = None - self._sub = None - self._iss = None - self._preferred_username = None - self.discriminator = None - - self.provider = provider - self.sub = sub - self.iss = iss - self.preferred_username = preferred_username - - @property - def provider(self): - """Gets the provider of this AuthOidc. # noqa: E501 - - Fatcat-specific short name (slug) for remote service being used for authentication. # noqa: E501 - - :return: The provider of this AuthOidc. # noqa: E501 - :rtype: str - """ - return self._provider - - @provider.setter - def provider(self, provider): - """Sets the provider of this AuthOidc. - - Fatcat-specific short name (slug) for remote service being used for authentication. # noqa: E501 - - :param provider: The provider of this AuthOidc. # noqa: E501 - :type: str - """ - if provider is None: - raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501 - - self._provider = provider - - @property - def sub(self): - """Gets the sub of this AuthOidc. # noqa: E501 - - `SUB` from OIDC protocol. Usually a URL. # noqa: E501 - - :return: The sub of this AuthOidc. # noqa: E501 - :rtype: str - """ - return self._sub - - @sub.setter - def sub(self, sub): - """Sets the sub of this AuthOidc. - - `SUB` from OIDC protocol. Usually a URL. # noqa: E501 - - :param sub: The sub of this AuthOidc. # noqa: E501 - :type: str - """ - if sub is None: - raise ValueError("Invalid value for `sub`, must not be `None`") # noqa: E501 - - self._sub = sub - - @property - def iss(self): - """Gets the iss of this AuthOidc. # noqa: E501 - - `ISS` from OIDC protocol. Usually a stable account username, number, or identifier. # noqa: E501 - - :return: The iss of this AuthOidc. # noqa: E501 - :rtype: str - """ - return self._iss - - @iss.setter - def iss(self, iss): - """Sets the iss of this AuthOidc. - - `ISS` from OIDC protocol. Usually a stable account username, number, or identifier. # noqa: E501 - - :param iss: The iss of this AuthOidc. # noqa: E501 - :type: str - """ - if iss is None: - raise ValueError("Invalid value for `iss`, must not be `None`") # noqa: E501 - - self._iss = iss - - @property - def preferred_username(self): - """Gets the preferred_username of this AuthOidc. # noqa: E501 - - What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur. # noqa: E501 - - :return: The preferred_username of this AuthOidc. # noqa: E501 - :rtype: str - """ - return self._preferred_username - - @preferred_username.setter - def preferred_username(self, preferred_username): - """Sets the preferred_username of this AuthOidc. - - What it sounds like; returned by OIDC, and used as a hint when creating new editor accounts. Fatcat usernames are usually this string with the `provider` slug as a suffix, though some munging may occur. # noqa: E501 - - :param preferred_username: The preferred_username of this AuthOidc. # noqa: E501 - :type: str - """ - if preferred_username is None: - raise ValueError("Invalid value for `preferred_username`, must not be `None`") # noqa: E501 - - self._preferred_username = preferred_username - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthOidc): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py b/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py deleted file mode 100644 index 5aa9dbfd..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/auth_oidc_result.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class AuthOidcResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editor': 'Editor', - 'token': 'str' - } - - attribute_map = { - 'editor': 'editor', - 'token': 'token' - } - - def __init__(self, editor=None, token=None): # noqa: E501 - """AuthOidcResult - a model defined in OpenAPI""" # noqa: E501 - - self._editor = None - self._token = None - self.discriminator = None - - self.editor = editor - self.token = token - - @property - def editor(self): - """Gets the editor of this AuthOidcResult. # noqa: E501 - - - :return: The editor of this AuthOidcResult. # noqa: E501 - :rtype: Editor - """ - return self._editor - - @editor.setter - def editor(self, editor): - """Sets the editor of this AuthOidcResult. - - - :param editor: The editor of this AuthOidcResult. # noqa: E501 - :type: Editor - """ - if editor is None: - raise ValueError("Invalid value for `editor`, must not be `None`") # noqa: E501 - - self._editor = editor - - @property - def token(self): - """Gets the token of this AuthOidcResult. # noqa: E501 - - - :return: The token of this AuthOidcResult. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this AuthOidcResult. - - - :param token: The token of this AuthOidcResult. # noqa: E501 - :type: str - """ - if token is None: - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthOidcResult): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py b/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py deleted file mode 100644 index 19c45e2e..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/auth_token_result.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class AuthTokenResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501 - """AuthTokenResult - a model defined in OpenAPI""" # noqa: E501 - - self._token = None - self.discriminator = None - - self.token = token - - @property - def token(self): - """Gets the token of this AuthTokenResult. # noqa: E501 - - - :return: The token of this AuthTokenResult. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this AuthTokenResult. - - - :param token: The token of this AuthTokenResult. # noqa: E501 - :type: str - """ - if token is None: - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthTokenResult): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py b/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py deleted file mode 100644 index bf9355d9..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/changelog_entry.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ChangelogEntry(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'index': 'int', - 'editgroup_id': 'str', - 'timestamp': 'datetime', - 'editgroup': 'Editgroup' - } - - attribute_map = { - 'index': 'index', - 'editgroup_id': 'editgroup_id', - 'timestamp': 'timestamp', - 'editgroup': 'editgroup' - } - - def __init__(self, index=None, editgroup_id=None, timestamp=None, editgroup=None): # noqa: E501 - """ChangelogEntry - a model defined in OpenAPI""" # noqa: E501 - - self._index = None - self._editgroup_id = None - self._timestamp = None - self._editgroup = None - self.discriminator = None - - self.index = index - self.editgroup_id = editgroup_id - self.timestamp = timestamp - if editgroup is not None: - self.editgroup = editgroup - - @property - def index(self): - """Gets the index of this ChangelogEntry. # noqa: E501 - - Monotonically increasing sequence number of this changelog entry. # noqa: E501 - - :return: The index of this ChangelogEntry. # noqa: E501 - :rtype: int - """ - return self._index - - @index.setter - def index(self, index): - """Sets the index of this ChangelogEntry. - - Monotonically increasing sequence number of this changelog entry. # noqa: E501 - - :param index: The index of this ChangelogEntry. # noqa: E501 - :type: int - """ - if index is None: - raise ValueError("Invalid value for `index`, must not be `None`") # noqa: E501 - - self._index = index - - @property - def editgroup_id(self): - """Gets the editgroup_id of this ChangelogEntry. # noqa: E501 - - Identifier of editgroup accepted/merged in this changelog entry. # noqa: E501 - - :return: The editgroup_id of this ChangelogEntry. # noqa: E501 - :rtype: str - """ - return self._editgroup_id - - @editgroup_id.setter - def editgroup_id(self, editgroup_id): - """Sets the editgroup_id of this ChangelogEntry. - - Identifier of editgroup accepted/merged in this changelog entry. # noqa: E501 - - :param editgroup_id: The editgroup_id of this ChangelogEntry. # noqa: E501 - :type: str - """ - if editgroup_id is None: - raise ValueError("Invalid value for `editgroup_id`, must not be `None`") # noqa: E501 - - self._editgroup_id = editgroup_id - - @property - def timestamp(self): - """Gets the timestamp of this ChangelogEntry. # noqa: E501 - - Date and time when the editgroup was accpeted. # noqa: E501 - - :return: The timestamp of this ChangelogEntry. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this ChangelogEntry. - - Date and time when the editgroup was accpeted. # noqa: E501 - - :param timestamp: The timestamp of this ChangelogEntry. # noqa: E501 - :type: datetime - """ - if timestamp is None: - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - - self._timestamp = timestamp - - @property - def editgroup(self): - """Gets the editgroup of this ChangelogEntry. # noqa: E501 - - - :return: The editgroup of this ChangelogEntry. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this ChangelogEntry. - - - :param editgroup: The editgroup of this ChangelogEntry. # noqa: E501 - :type: Editgroup - """ - - self._editgroup = editgroup - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ChangelogEntry): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py deleted file mode 100644 index df30ca1d..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/container_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ContainerAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[ContainerEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """ContainerAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this ContainerAutoBatch. # noqa: E501 - - - :return: The editgroup of this ContainerAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this ContainerAutoBatch. - - - :param editgroup: The editgroup of this ContainerAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this ContainerAutoBatch. # noqa: E501 - - - :return: The entity_list of this ContainerAutoBatch. # noqa: E501 - :rtype: list[ContainerEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this ContainerAutoBatch. - - - :param entity_list: The entity_list of this ContainerAutoBatch. # noqa: E501 - :type: list[ContainerEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContainerAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/container_entity.py b/python_openapi_client/fatcat_openapi_client/models/container_entity.py deleted file mode 100644 index d6b23469..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/container_entity.py +++ /dev/null @@ -1,517 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.4.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ContainerEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'name': 'str', - 'container_type': 'str', - 'publication_status': 'str', - 'publisher': 'str', - 'issnl': 'str', - 'issne': 'str', - 'issnp': 'str', - 'wikidata_qid': 'str' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'name': 'name', - 'container_type': 'container_type', - 'publication_status': 'publication_status', - 'publisher': 'publisher', - 'issnl': 'issnl', - 'issne': 'issne', - 'issnp': 'issnp', - 'wikidata_qid': 'wikidata_qid' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, name=None, container_type=None, publication_status=None, publisher=None, issnl=None, issne=None, issnp=None, wikidata_qid=None): # noqa: E501 - """ContainerEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._name = None - self._container_type = None - self._publication_status = None - self._publisher = None - self._issnl = None - self._issne = None - self._issnp = None - self._wikidata_qid = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if name is not None: - self.name = name - if container_type is not None: - self.container_type = container_type - if publication_status is not None: - self.publication_status = publication_status - if publisher is not None: - self.publisher = publisher - if issnl is not None: - self.issnl = issnl - if issne is not None: - self.issne = issne - if issnp is not None: - self.issnp = issnp - if wikidata_qid is not None: - self.wikidata_qid = wikidata_qid - - @property - def state(self): - """Gets the state of this ContainerEntity. # noqa: E501 - - - :return: The state of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ContainerEntity. - - - :param state: The state of this ContainerEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this ContainerEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this ContainerEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this ContainerEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this ContainerEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this ContainerEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this ContainerEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this ContainerEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this ContainerEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this ContainerEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this ContainerEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this ContainerEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this ContainerEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this ContainerEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this ContainerEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this ContainerEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this ContainerEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this ContainerEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def name(self): - """Gets the name of this ContainerEntity. # noqa: E501 - - Name of the container (eg, Journal title). Required for entity creation. # noqa: E501 - - :return: The name of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ContainerEntity. - - Name of the container (eg, Journal title). Required for entity creation. # noqa: E501 - - :param name: The name of this ContainerEntity. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def container_type(self): - """Gets the container_type of this ContainerEntity. # noqa: E501 - - Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 - - :return: The container_type of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._container_type - - @container_type.setter - def container_type(self, container_type): - """Sets the container_type of this ContainerEntity. - - Type of container, eg 'journal' or 'proceedings'. See Guide for list of valid types. # noqa: E501 - - :param container_type: The container_type of this ContainerEntity. # noqa: E501 - :type: str - """ - - self._container_type = container_type - - @property - def publication_status(self): - """Gets the publication_status of this ContainerEntity. # noqa: E501 - - Whether the container is active, discontinued, etc # noqa: E501 - - :return: The publication_status of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._publication_status - - @publication_status.setter - def publication_status(self, publication_status): - """Sets the publication_status of this ContainerEntity. - - Whether the container is active, discontinued, etc # noqa: E501 - - :param publication_status: The publication_status of this ContainerEntity. # noqa: E501 - :type: str - """ - - self._publication_status = publication_status - - @property - def publisher(self): - """Gets the publisher of this ContainerEntity. # noqa: E501 - - Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 - - :return: The publisher of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this ContainerEntity. - - Name of the organization or entity responsible for publication. Not the complete imprint/brand. # noqa: E501 - - :param publisher: The publisher of this ContainerEntity. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def issnl(self): - """Gets the issnl of this ContainerEntity. # noqa: E501 - - Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 - - :return: The issnl of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._issnl - - @issnl.setter - def issnl(self, issnl): - """Sets the issnl of this ContainerEntity. - - Linking ISSN number (ISSN-L). Should be valid and registered with issn.org # noqa: E501 - - :param issnl: The issnl of this ContainerEntity. # noqa: E501 - :type: str - """ - if issnl is not None and len(issnl) > 9: - raise ValueError("Invalid value for `issnl`, length must be less than or equal to `9`") # noqa: E501 - if issnl is not None and len(issnl) < 9: - raise ValueError("Invalid value for `issnl`, length must be greater than or equal to `9`") # noqa: E501 - if issnl is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issnl): # noqa: E501 - raise ValueError(r"Invalid value for `issnl`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501 - - self._issnl = issnl - - @property - def issne(self): - """Gets the issne of this ContainerEntity. # noqa: E501 - - Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501 - - :return: The issne of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._issne - - @issne.setter - def issne(self, issne): - """Sets the issne of this ContainerEntity. - - Electronic ISSN number (ISSN-E). Should be valid and registered with issn.org # noqa: E501 - - :param issne: The issne of this ContainerEntity. # noqa: E501 - :type: str - """ - if issne is not None and len(issne) > 9: - raise ValueError("Invalid value for `issne`, length must be less than or equal to `9`") # noqa: E501 - if issne is not None and len(issne) < 9: - raise ValueError("Invalid value for `issne`, length must be greater than or equal to `9`") # noqa: E501 - if issne is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issne): # noqa: E501 - raise ValueError(r"Invalid value for `issne`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501 - - self._issne = issne - - @property - def issnp(self): - """Gets the issnp of this ContainerEntity. # noqa: E501 - - Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501 - - :return: The issnp of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._issnp - - @issnp.setter - def issnp(self, issnp): - """Sets the issnp of this ContainerEntity. - - Print ISSN number (ISSN-P). Should be valid and registered with issn.org # noqa: E501 - - :param issnp: The issnp of this ContainerEntity. # noqa: E501 - :type: str - """ - if issnp is not None and len(issnp) > 9: - raise ValueError("Invalid value for `issnp`, length must be less than or equal to `9`") # noqa: E501 - if issnp is not None and len(issnp) < 9: - raise ValueError("Invalid value for `issnp`, length must be greater than or equal to `9`") # noqa: E501 - if issnp is not None and not re.search(r'\d{4}-\d{3}[0-9X]', issnp): # noqa: E501 - raise ValueError(r"Invalid value for `issnp`, must be a follow pattern or equal to `/\d{4}-\d{3}[0-9X]/`") # noqa: E501 - - self._issnp = issnp - - @property - def wikidata_qid(self): - """Gets the wikidata_qid of this ContainerEntity. # noqa: E501 - - - :return: The wikidata_qid of this ContainerEntity. # noqa: E501 - :rtype: str - """ - return self._wikidata_qid - - @wikidata_qid.setter - def wikidata_qid(self, wikidata_qid): - """Sets the wikidata_qid of this ContainerEntity. - - - :param wikidata_qid: The wikidata_qid of this ContainerEntity. # noqa: E501 - :type: str - """ - - self._wikidata_qid = wikidata_qid - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContainerEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py deleted file mode 100644 index d6a2df87..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/creator_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class CreatorAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[CreatorEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """CreatorAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this CreatorAutoBatch. # noqa: E501 - - - :return: The editgroup of this CreatorAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this CreatorAutoBatch. - - - :param editgroup: The editgroup of this CreatorAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this CreatorAutoBatch. # noqa: E501 - - - :return: The entity_list of this CreatorAutoBatch. # noqa: E501 - :rtype: list[CreatorEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this CreatorAutoBatch. - - - :param entity_list: The entity_list of this CreatorAutoBatch. # noqa: E501 - :type: list[CreatorEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatorAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/creator_entity.py b/python_openapi_client/fatcat_openapi_client/models/creator_entity.py deleted file mode 100644 index 41d00b6e..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/creator_entity.py +++ /dev/null @@ -1,423 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class CreatorEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'display_name': 'str', - 'given_name': 'str', - 'surname': 'str', - 'orcid': 'str', - 'wikidata_qid': 'str' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'display_name': 'display_name', - 'given_name': 'given_name', - 'surname': 'surname', - 'orcid': 'orcid', - 'wikidata_qid': 'wikidata_qid' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, display_name=None, given_name=None, surname=None, orcid=None, wikidata_qid=None): # noqa: E501 - """CreatorEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._display_name = None - self._given_name = None - self._surname = None - self._orcid = None - self._wikidata_qid = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if display_name is not None: - self.display_name = display_name - if given_name is not None: - self.given_name = given_name - if surname is not None: - self.surname = surname - if orcid is not None: - self.orcid = orcid - if wikidata_qid is not None: - self.wikidata_qid = wikidata_qid - - @property - def state(self): - """Gets the state of this CreatorEntity. # noqa: E501 - - - :return: The state of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this CreatorEntity. - - - :param state: The state of this CreatorEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this CreatorEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this CreatorEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this CreatorEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this CreatorEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this CreatorEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this CreatorEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this CreatorEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this CreatorEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this CreatorEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this CreatorEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this CreatorEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this CreatorEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this CreatorEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this CreatorEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this CreatorEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this CreatorEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this CreatorEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def display_name(self): - """Gets the display_name of this CreatorEntity. # noqa: E501 - - Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. # noqa: E501 - - :return: The display_name of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._display_name - - @display_name.setter - def display_name(self, display_name): - """Sets the display_name of this CreatorEntity. - - Name as should be displayed in web interface or in author lists (not index/sorted). Required for valid entities. # noqa: E501 - - :param display_name: The display_name of this CreatorEntity. # noqa: E501 - :type: str - """ - - self._display_name = display_name - - @property - def given_name(self): - """Gets the given_name of this CreatorEntity. # noqa: E501 - - In English commonly the first name, but ordering is context and culture specific. # noqa: E501 - - :return: The given_name of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this CreatorEntity. - - In English commonly the first name, but ordering is context and culture specific. # noqa: E501 - - :param given_name: The given_name of this CreatorEntity. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def surname(self): - """Gets the surname of this CreatorEntity. # noqa: E501 - - In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501 - - :return: The surname of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._surname - - @surname.setter - def surname(self, surname): - """Sets the surname of this CreatorEntity. - - In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501 - - :param surname: The surname of this CreatorEntity. # noqa: E501 - :type: str - """ - - self._surname = surname - - @property - def orcid(self): - """Gets the orcid of this CreatorEntity. # noqa: E501 - - ORCiD (https://orcid.org) identifier # noqa: E501 - - :return: The orcid of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorEntity. - - ORCiD (https://orcid.org) identifier # noqa: E501 - - :param orcid: The orcid of this CreatorEntity. # noqa: E501 - :type: str - """ - if orcid is not None and len(orcid) > 19: - raise ValueError("Invalid value for `orcid`, length must be less than or equal to `19`") # noqa: E501 - if orcid is not None and len(orcid) < 19: - raise ValueError("Invalid value for `orcid`, length must be greater than or equal to `19`") # noqa: E501 - if orcid is not None and not re.search(r'\d{4}-\d{4}-\d{4}-\d{3}[\dX]', orcid): # noqa: E501 - raise ValueError(r"Invalid value for `orcid`, must be a follow pattern or equal to `/\d{4}-\d{4}-\d{4}-\d{3}[\dX]/`") # noqa: E501 - - self._orcid = orcid - - @property - def wikidata_qid(self): - """Gets the wikidata_qid of this CreatorEntity. # noqa: E501 - - Wikidata entity QID # noqa: E501 - - :return: The wikidata_qid of this CreatorEntity. # noqa: E501 - :rtype: str - """ - return self._wikidata_qid - - @wikidata_qid.setter - def wikidata_qid(self, wikidata_qid): - """Sets the wikidata_qid of this CreatorEntity. - - Wikidata entity QID # noqa: E501 - - :param wikidata_qid: The wikidata_qid of this CreatorEntity. # noqa: E501 - :type: str - """ - - self._wikidata_qid = wikidata_qid - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatorEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup.py b/python_openapi_client/fatcat_openapi_client/models/editgroup.py deleted file mode 100644 index 37742d90..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class Editgroup(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup_id': 'str', - 'editor_id': 'str', - 'editor': 'Editor', - 'changelog_index': 'int', - 'created': 'datetime', - 'submitted': 'datetime', - 'description': 'str', - 'extra': 'dict(str, object)', - 'annotations': 'list[EditgroupAnnotation]', - 'edits': 'EditgroupEdits' - } - - attribute_map = { - 'editgroup_id': 'editgroup_id', - 'editor_id': 'editor_id', - 'editor': 'editor', - 'changelog_index': 'changelog_index', - 'created': 'created', - 'submitted': 'submitted', - 'description': 'description', - 'extra': 'extra', - 'annotations': 'annotations', - 'edits': 'edits' - } - - def __init__(self, editgroup_id=None, editor_id=None, editor=None, changelog_index=None, created=None, submitted=None, description=None, extra=None, annotations=None, edits=None): # noqa: E501 - """Editgroup - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup_id = None - self._editor_id = None - self._editor = None - self._changelog_index = None - self._created = None - self._submitted = None - self._description = None - self._extra = None - self._annotations = None - self._edits = None - self.discriminator = None - - if editgroup_id is not None: - self.editgroup_id = editgroup_id - if editor_id is not None: - self.editor_id = editor_id - if editor is not None: - self.editor = editor - if changelog_index is not None: - self.changelog_index = changelog_index - if created is not None: - self.created = created - if submitted is not None: - self.submitted = submitted - if description is not None: - self.description = description - if extra is not None: - self.extra = extra - if annotations is not None: - self.annotations = annotations - if edits is not None: - self.edits = edits - - @property - def editgroup_id(self): - """Gets the editgroup_id of this Editgroup. # noqa: E501 - - Fatcat identifier for this editgroup. Assigned on creation. # noqa: E501 - - :return: The editgroup_id of this Editgroup. # noqa: E501 - :rtype: str - """ - return self._editgroup_id - - @editgroup_id.setter - def editgroup_id(self, editgroup_id): - """Sets the editgroup_id of this Editgroup. - - Fatcat identifier for this editgroup. Assigned on creation. # noqa: E501 - - :param editgroup_id: The editgroup_id of this Editgroup. # noqa: E501 - :type: str - """ - if editgroup_id is not None and len(editgroup_id) > 26: - raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501 - if editgroup_id is not None and len(editgroup_id) < 26: - raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501 - if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editgroup_id = editgroup_id - - @property - def editor_id(self): - """Gets the editor_id of this Editgroup. # noqa: E501 - - Fatcat identifer of editor that created this editgroup. # noqa: E501 - - :return: The editor_id of this Editgroup. # noqa: E501 - :rtype: str - """ - return self._editor_id - - @editor_id.setter - def editor_id(self, editor_id): - """Sets the editor_id of this Editgroup. - - Fatcat identifer of editor that created this editgroup. # noqa: E501 - - :param editor_id: The editor_id of this Editgroup. # noqa: E501 - :type: str - """ - if editor_id is not None and len(editor_id) > 26: - raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501 - if editor_id is not None and len(editor_id) < 26: - raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501 - if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editor_id = editor_id - - @property - def editor(self): - """Gets the editor of this Editgroup. # noqa: E501 - - - :return: The editor of this Editgroup. # noqa: E501 - :rtype: Editor - """ - return self._editor - - @editor.setter - def editor(self, editor): - """Sets the editor of this Editgroup. - - - :param editor: The editor of this Editgroup. # noqa: E501 - :type: Editor - """ - - self._editor = editor - - @property - def changelog_index(self): - """Gets the changelog_index of this Editgroup. # noqa: E501 - - For accepted/merged editgroups, the changelog index that the accept occured at. WARNING: not populated in all contexts that an editgroup could be included in a response. # noqa: E501 - - :return: The changelog_index of this Editgroup. # noqa: E501 - :rtype: int - """ - return self._changelog_index - - @changelog_index.setter - def changelog_index(self, changelog_index): - """Sets the changelog_index of this Editgroup. - - For accepted/merged editgroups, the changelog index that the accept occured at. WARNING: not populated in all contexts that an editgroup could be included in a response. # noqa: E501 - - :param changelog_index: The changelog_index of this Editgroup. # noqa: E501 - :type: int - """ - - self._changelog_index = changelog_index - - @property - def created(self): - """Gets the created of this Editgroup. # noqa: E501 - - Timestamp when this editgroup was first created. # noqa: E501 - - :return: The created of this Editgroup. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Editgroup. - - Timestamp when this editgroup was first created. # noqa: E501 - - :param created: The created of this Editgroup. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def submitted(self): - """Gets the submitted of this Editgroup. # noqa: E501 - - Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. # noqa: E501 - - :return: The submitted of this Editgroup. # noqa: E501 - :rtype: datetime - """ - return self._submitted - - @submitted.setter - def submitted(self, submitted): - """Sets the submitted of this Editgroup. - - Timestamp when this editgroup was most recently submitted for review. If withdrawn, or never submitted, will be `null`. # noqa: E501 - - :param submitted: The submitted of this Editgroup. # noqa: E501 - :type: datetime - """ - - self._submitted = submitted - - @property - def description(self): - """Gets the description of this Editgroup. # noqa: E501 - - Comment describing the changes in this editgroup. Can be updated with PUT request. # noqa: E501 - - :return: The description of this Editgroup. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Editgroup. - - Comment describing the changes in this editgroup. Can be updated with PUT request. # noqa: E501 - - :param description: The description of this Editgroup. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def extra(self): - """Gets the extra of this Editgroup. # noqa: E501 - - Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. # noqa: E501 - - :return: The extra of this Editgroup. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this Editgroup. - - Free-form JSON metadata attached to this editgroup. Eg, metadata provenance, or script user-agent details. See guide for (unenforced) schema norms. # noqa: E501 - - :param extra: The extra of this Editgroup. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def annotations(self): - """Gets the annotations of this Editgroup. # noqa: E501 - - Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. # noqa: E501 - - :return: The annotations of this Editgroup. # noqa: E501 - :rtype: list[EditgroupAnnotation] - """ - return self._annotations - - @annotations.setter - def annotations(self, annotations): - """Sets the annotations of this Editgroup. - - Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests. # noqa: E501 - - :param annotations: The annotations of this Editgroup. # noqa: E501 - :type: list[EditgroupAnnotation] - """ - - self._annotations = annotations - - @property - def edits(self): - """Gets the edits of this Editgroup. # noqa: E501 - - - :return: The edits of this Editgroup. # noqa: E501 - :rtype: EditgroupEdits - """ - return self._edits - - @edits.setter - def edits(self, edits): - """Sets the edits of this Editgroup. - - - :param edits: The edits of this Editgroup. # noqa: E501 - :type: EditgroupEdits - """ - - self._edits = edits - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Editgroup): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py deleted file mode 100644 index 81868060..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup_annotation.py +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class EditgroupAnnotation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'annotation_id': 'str', - 'editgroup_id': 'str', - 'editor_id': 'str', - 'editor': 'Editor', - 'created': 'datetime', - 'comment_markdown': 'str', - 'extra': 'dict(str, object)' - } - - attribute_map = { - 'annotation_id': 'annotation_id', - 'editgroup_id': 'editgroup_id', - 'editor_id': 'editor_id', - 'editor': 'editor', - 'created': 'created', - 'comment_markdown': 'comment_markdown', - 'extra': 'extra' - } - - def __init__(self, annotation_id=None, editgroup_id=None, editor_id=None, editor=None, created=None, comment_markdown=None, extra=None): # noqa: E501 - """EditgroupAnnotation - a model defined in OpenAPI""" # noqa: E501 - - self._annotation_id = None - self._editgroup_id = None - self._editor_id = None - self._editor = None - self._created = None - self._comment_markdown = None - self._extra = None - self.discriminator = None - - if annotation_id is not None: - self.annotation_id = annotation_id - if editgroup_id is not None: - self.editgroup_id = editgroup_id - if editor_id is not None: - self.editor_id = editor_id - if editor is not None: - self.editor = editor - if created is not None: - self.created = created - if comment_markdown is not None: - self.comment_markdown = comment_markdown - if extra is not None: - self.extra = extra - - @property - def annotation_id(self): - """Gets the annotation_id of this EditgroupAnnotation. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The annotation_id of this EditgroupAnnotation. # noqa: E501 - :rtype: str - """ - return self._annotation_id - - @annotation_id.setter - def annotation_id(self, annotation_id): - """Sets the annotation_id of this EditgroupAnnotation. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param annotation_id: The annotation_id of this EditgroupAnnotation. # noqa: E501 - :type: str - """ - if annotation_id is not None and len(annotation_id) > 36: - raise ValueError("Invalid value for `annotation_id`, length must be less than or equal to `36`") # noqa: E501 - if annotation_id is not None and len(annotation_id) < 36: - raise ValueError("Invalid value for `annotation_id`, length must be greater than or equal to `36`") # noqa: E501 - if annotation_id is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', annotation_id): # noqa: E501 - raise ValueError(r"Invalid value for `annotation_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._annotation_id = annotation_id - - @property - def editgroup_id(self): - """Gets the editgroup_id of this EditgroupAnnotation. # noqa: E501 - - Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. # noqa: E501 - - :return: The editgroup_id of this EditgroupAnnotation. # noqa: E501 - :rtype: str - """ - return self._editgroup_id - - @editgroup_id.setter - def editgroup_id(self, editgroup_id): - """Sets the editgroup_id of this EditgroupAnnotation. - - Editgroup that this annotation applies to. Set automatically in creations based on URL parameter. # noqa: E501 - - :param editgroup_id: The editgroup_id of this EditgroupAnnotation. # noqa: E501 - :type: str - """ - if editgroup_id is not None and len(editgroup_id) > 26: - raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501 - if editgroup_id is not None and len(editgroup_id) < 26: - raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501 - if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editgroup_id = editgroup_id - - @property - def editor_id(self): - """Gets the editor_id of this EditgroupAnnotation. # noqa: E501 - - Defaults to editor created the annotation via POST request. # noqa: E501 - - :return: The editor_id of this EditgroupAnnotation. # noqa: E501 - :rtype: str - """ - return self._editor_id - - @editor_id.setter - def editor_id(self, editor_id): - """Sets the editor_id of this EditgroupAnnotation. - - Defaults to editor created the annotation via POST request. # noqa: E501 - - :param editor_id: The editor_id of this EditgroupAnnotation. # noqa: E501 - :type: str - """ - if editor_id is not None and len(editor_id) > 26: - raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501 - if editor_id is not None and len(editor_id) < 26: - raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501 - if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editor_id = editor_id - - @property - def editor(self): - """Gets the editor of this EditgroupAnnotation. # noqa: E501 - - - :return: The editor of this EditgroupAnnotation. # noqa: E501 - :rtype: Editor - """ - return self._editor - - @editor.setter - def editor(self, editor): - """Sets the editor of this EditgroupAnnotation. - - - :param editor: The editor of this EditgroupAnnotation. # noqa: E501 - :type: Editor - """ - - self._editor = editor - - @property - def created(self): - """Gets the created of this EditgroupAnnotation. # noqa: E501 - - Timestamp when annotation was first created. # noqa: E501 - - :return: The created of this EditgroupAnnotation. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this EditgroupAnnotation. - - Timestamp when annotation was first created. # noqa: E501 - - :param created: The created of this EditgroupAnnotation. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def comment_markdown(self): - """Gets the comment_markdown of this EditgroupAnnotation. # noqa: E501 - - - :return: The comment_markdown of this EditgroupAnnotation. # noqa: E501 - :rtype: str - """ - return self._comment_markdown - - @comment_markdown.setter - def comment_markdown(self, comment_markdown): - """Sets the comment_markdown of this EditgroupAnnotation. - - - :param comment_markdown: The comment_markdown of this EditgroupAnnotation. # noqa: E501 - :type: str - """ - - self._comment_markdown = comment_markdown - - @property - def extra(self): - """Gets the extra of this EditgroupAnnotation. # noqa: E501 - - Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. # noqa: E501 - - :return: The extra of this EditgroupAnnotation. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this EditgroupAnnotation. - - Additional free-form JSON metadata that can be included as part of the annotation (or even as the primary annotation itself). See guide for details. # noqa: E501 - - :param extra: The extra of this EditgroupAnnotation. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EditgroupAnnotation): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py b/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py deleted file mode 100644 index 39340ce9..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/editgroup_edits.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class EditgroupEdits(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'containers': 'list[EntityEdit]', - 'creators': 'list[EntityEdit]', - 'files': 'list[EntityEdit]', - 'filesets': 'list[EntityEdit]', - 'webcaptures': 'list[EntityEdit]', - 'releases': 'list[EntityEdit]', - 'works': 'list[EntityEdit]' - } - - attribute_map = { - 'containers': 'containers', - 'creators': 'creators', - 'files': 'files', - 'filesets': 'filesets', - 'webcaptures': 'webcaptures', - 'releases': 'releases', - 'works': 'works' - } - - def __init__(self, containers=None, creators=None, files=None, filesets=None, webcaptures=None, releases=None, works=None): # noqa: E501 - """EditgroupEdits - a model defined in OpenAPI""" # noqa: E501 - - self._containers = None - self._creators = None - self._files = None - self._filesets = None - self._webcaptures = None - self._releases = None - self._works = None - self.discriminator = None - - if containers is not None: - self.containers = containers - if creators is not None: - self.creators = creators - if files is not None: - self.files = files - if filesets is not None: - self.filesets = filesets - if webcaptures is not None: - self.webcaptures = webcaptures - if releases is not None: - self.releases = releases - if works is not None: - self.works = works - - @property - def containers(self): - """Gets the containers of this EditgroupEdits. # noqa: E501 - - - :return: The containers of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._containers - - @containers.setter - def containers(self, containers): - """Sets the containers of this EditgroupEdits. - - - :param containers: The containers of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._containers = containers - - @property - def creators(self): - """Gets the creators of this EditgroupEdits. # noqa: E501 - - - :return: The creators of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this EditgroupEdits. - - - :param creators: The creators of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._creators = creators - - @property - def files(self): - """Gets the files of this EditgroupEdits. # noqa: E501 - - - :return: The files of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._files - - @files.setter - def files(self, files): - """Sets the files of this EditgroupEdits. - - - :param files: The files of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._files = files - - @property - def filesets(self): - """Gets the filesets of this EditgroupEdits. # noqa: E501 - - - :return: The filesets of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._filesets - - @filesets.setter - def filesets(self, filesets): - """Sets the filesets of this EditgroupEdits. - - - :param filesets: The filesets of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._filesets = filesets - - @property - def webcaptures(self): - """Gets the webcaptures of this EditgroupEdits. # noqa: E501 - - - :return: The webcaptures of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._webcaptures - - @webcaptures.setter - def webcaptures(self, webcaptures): - """Sets the webcaptures of this EditgroupEdits. - - - :param webcaptures: The webcaptures of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._webcaptures = webcaptures - - @property - def releases(self): - """Gets the releases of this EditgroupEdits. # noqa: E501 - - - :return: The releases of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._releases - - @releases.setter - def releases(self, releases): - """Sets the releases of this EditgroupEdits. - - - :param releases: The releases of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._releases = releases - - @property - def works(self): - """Gets the works of this EditgroupEdits. # noqa: E501 - - - :return: The works of this EditgroupEdits. # noqa: E501 - :rtype: list[EntityEdit] - """ - return self._works - - @works.setter - def works(self, works): - """Sets the works of this EditgroupEdits. - - - :param works: The works of this EditgroupEdits. # noqa: E501 - :type: list[EntityEdit] - """ - - self._works = works - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EditgroupEdits): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/editor.py b/python_openapi_client/fatcat_openapi_client/models/editor.py deleted file mode 100644 index d526531e..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/editor.py +++ /dev/null @@ -1,234 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class Editor(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editor_id': 'str', - 'username': 'str', - 'is_admin': 'bool', - 'is_bot': 'bool', - 'is_active': 'bool' - } - - attribute_map = { - 'editor_id': 'editor_id', - 'username': 'username', - 'is_admin': 'is_admin', - 'is_bot': 'is_bot', - 'is_active': 'is_active' - } - - def __init__(self, editor_id=None, username=None, is_admin=None, is_bot=None, is_active=None): # noqa: E501 - """Editor - a model defined in OpenAPI""" # noqa: E501 - - self._editor_id = None - self._username = None - self._is_admin = None - self._is_bot = None - self._is_active = None - self.discriminator = None - - if editor_id is not None: - self.editor_id = editor_id - self.username = username - if is_admin is not None: - self.is_admin = is_admin - if is_bot is not None: - self.is_bot = is_bot - if is_active is not None: - self.is_active = is_active - - @property - def editor_id(self): - """Gets the editor_id of this Editor. # noqa: E501 - - Fatcat identifier for the editor. Can not be changed. # noqa: E501 - - :return: The editor_id of this Editor. # noqa: E501 - :rtype: str - """ - return self._editor_id - - @editor_id.setter - def editor_id(self, editor_id): - """Sets the editor_id of this Editor. - - Fatcat identifier for the editor. Can not be changed. # noqa: E501 - - :param editor_id: The editor_id of this Editor. # noqa: E501 - :type: str - """ - if editor_id is not None and len(editor_id) > 26: - raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501 - if editor_id is not None and len(editor_id) < 26: - raise ValueError("Invalid value for `editor_id`, length must be greater than or equal to `26`") # noqa: E501 - if editor_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editor_id): # noqa: E501 - raise ValueError(r"Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editor_id = editor_id - - @property - def username(self): - """Gets the username of this Editor. # noqa: E501 - - Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifer. # noqa: E501 - - :return: The username of this Editor. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this Editor. - - Username/handle (short slug-like string) to identify this editor. May be changed at any time by the editor; use the `editor_id` as a persistend identifer. # noqa: E501 - - :param username: The username of this Editor. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def is_admin(self): - """Gets the is_admin of this Editor. # noqa: E501 - - Whether this editor has the `admin` role. # noqa: E501 - - :return: The is_admin of this Editor. # noqa: E501 - :rtype: bool - """ - return self._is_admin - - @is_admin.setter - def is_admin(self, is_admin): - """Sets the is_admin of this Editor. - - Whether this editor has the `admin` role. # noqa: E501 - - :param is_admin: The is_admin of this Editor. # noqa: E501 - :type: bool - """ - - self._is_admin = is_admin - - @property - def is_bot(self): - """Gets the is_bot of this Editor. # noqa: E501 - - Whether this editor is a bot (as opposed to a human making manual edits) # noqa: E501 - - :return: The is_bot of this Editor. # noqa: E501 - :rtype: bool - """ - return self._is_bot - - @is_bot.setter - def is_bot(self, is_bot): - """Sets the is_bot of this Editor. - - Whether this editor is a bot (as opposed to a human making manual edits) # noqa: E501 - - :param is_bot: The is_bot of this Editor. # noqa: E501 - :type: bool - """ - - self._is_bot = is_bot - - @property - def is_active(self): - """Gets the is_active of this Editor. # noqa: E501 - - Whether this editor's account is enabled (if not API tokens and web logins will not work). # noqa: E501 - - :return: The is_active of this Editor. # noqa: E501 - :rtype: bool - """ - return self._is_active - - @is_active.setter - def is_active(self, is_active): - """Sets the is_active of this Editor. - - Whether this editor's account is enabled (if not API tokens and web logins will not work). # noqa: E501 - - :param is_active: The is_active of this Editor. # noqa: E501 - :type: bool - """ - - self._is_active = is_active - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Editor): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py deleted file mode 100644 index be35815f..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py +++ /dev/null @@ -1,320 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class EntityEdit(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'edit_id': 'str', - 'ident': 'str', - 'revision': 'str', - 'prev_revision': 'str', - 'redirect_ident': 'str', - 'editgroup_id': 'str', - 'extra': 'dict(str, object)' - } - - attribute_map = { - 'edit_id': 'edit_id', - 'ident': 'ident', - 'revision': 'revision', - 'prev_revision': 'prev_revision', - 'redirect_ident': 'redirect_ident', - 'editgroup_id': 'editgroup_id', - 'extra': 'extra' - } - - def __init__(self, edit_id=None, ident=None, revision=None, prev_revision=None, redirect_ident=None, editgroup_id=None, extra=None): # noqa: E501 - """EntityEdit - a model defined in OpenAPI""" # noqa: E501 - - self._edit_id = None - self._ident = None - self._revision = None - self._prev_revision = None - self._redirect_ident = None - self._editgroup_id = None - self._extra = None - self.discriminator = None - - self.edit_id = edit_id - self.ident = ident - if revision is not None: - self.revision = revision - if prev_revision is not None: - self.prev_revision = prev_revision - if redirect_ident is not None: - self.redirect_ident = redirect_ident - self.editgroup_id = editgroup_id - if extra is not None: - self.extra = extra - - @property - def edit_id(self): - """Gets the edit_id of this EntityEdit. # noqa: E501 - - Unique UUID for this specific edit object. # noqa: E501 - - :return: The edit_id of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._edit_id - - @edit_id.setter - def edit_id(self, edit_id): - """Sets the edit_id of this EntityEdit. - - Unique UUID for this specific edit object. # noqa: E501 - - :param edit_id: The edit_id of this EntityEdit. # noqa: E501 - :type: str - """ - if edit_id is None: - raise ValueError("Invalid value for `edit_id`, must not be `None`") # noqa: E501 - if edit_id is not None and len(edit_id) > 36: - raise ValueError("Invalid value for `edit_id`, length must be less than or equal to `36`") # noqa: E501 - if edit_id is not None and len(edit_id) < 36: - raise ValueError("Invalid value for `edit_id`, length must be greater than or equal to `36`") # noqa: E501 - if edit_id is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501 - raise ValueError(r"Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._edit_id = edit_id - - @property - def ident(self): - """Gets the ident of this EntityEdit. # noqa: E501 - - Fatcat identifier of the entity this edit is mutating. # noqa: E501 - - :return: The ident of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this EntityEdit. - - Fatcat identifier of the entity this edit is mutating. # noqa: E501 - - :param ident: The ident of this EntityEdit. # noqa: E501 - :type: str - """ - if ident is None: - raise ValueError("Invalid value for `ident`, must not be `None`") # noqa: E501 - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this EntityEdit. # noqa: E501 - - Entity revision that this edit will set the entity to. May be `null` in the case of deletions. # noqa: E501 - - :return: The revision of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this EntityEdit. - - Entity revision that this edit will set the entity to. May be `null` in the case of deletions. # noqa: E501 - - :param revision: The revision of this EntityEdit. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def prev_revision(self): - """Gets the prev_revision of this EntityEdit. # noqa: E501 - - Revision of entity just before this edit. May be used in the future to prevent edit race conditions. # noqa: E501 - - :return: The prev_revision of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._prev_revision - - @prev_revision.setter - def prev_revision(self, prev_revision): - """Sets the prev_revision of this EntityEdit. - - Revision of entity just before this edit. May be used in the future to prevent edit race conditions. # noqa: E501 - - :param prev_revision: The prev_revision of this EntityEdit. # noqa: E501 - :type: str - """ - if prev_revision is not None and len(prev_revision) > 36: - raise ValueError("Invalid value for `prev_revision`, length must be less than or equal to `36`") # noqa: E501 - if prev_revision is not None and len(prev_revision) < 36: - raise ValueError("Invalid value for `prev_revision`, length must be greater than or equal to `36`") # noqa: E501 - if prev_revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501 - raise ValueError(r"Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._prev_revision = prev_revision - - @property - def redirect_ident(self): - """Gets the redirect_ident of this EntityEdit. # noqa: E501 - - When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. # noqa: E501 - - :return: The redirect_ident of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._redirect_ident - - @redirect_ident.setter - def redirect_ident(self, redirect_ident): - """Sets the redirect_ident of this EntityEdit. - - When an edit is to merge entities (redirect one to another), this is the entity fatcat identifier for the target entity. # noqa: E501 - - :param redirect_ident: The redirect_ident of this EntityEdit. # noqa: E501 - :type: str - """ - if redirect_ident is not None and len(redirect_ident) > 26: - raise ValueError("Invalid value for `redirect_ident`, length must be less than or equal to `26`") # noqa: E501 - if redirect_ident is not None and len(redirect_ident) < 26: - raise ValueError("Invalid value for `redirect_ident`, length must be greater than or equal to `26`") # noqa: E501 - if redirect_ident is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501 - raise ValueError(r"Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect_ident = redirect_ident - - @property - def editgroup_id(self): - """Gets the editgroup_id of this EntityEdit. # noqa: E501 - - Editgroup identifier that this edit is part of. # noqa: E501 - - :return: The editgroup_id of this EntityEdit. # noqa: E501 - :rtype: str - """ - return self._editgroup_id - - @editgroup_id.setter - def editgroup_id(self, editgroup_id): - """Sets the editgroup_id of this EntityEdit. - - Editgroup identifier that this edit is part of. # noqa: E501 - - :param editgroup_id: The editgroup_id of this EntityEdit. # noqa: E501 - :type: str - """ - if editgroup_id is None: - raise ValueError("Invalid value for `editgroup_id`, must not be `None`") # noqa: E501 - if editgroup_id is not None and len(editgroup_id) > 26: - raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501 - if editgroup_id is not None and len(editgroup_id) < 26: - raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501 - if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._editgroup_id = editgroup_id - - @property - def extra(self): - """Gets the extra of this EntityEdit. # noqa: E501 - - - :return: The extra of this EntityEdit. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this EntityEdit. - - - :param extra: The extra of this EntityEdit. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EntityEdit): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py b/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py deleted file mode 100644 index 14639b1a..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/entity_history_entry.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class EntityHistoryEntry(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'edit': 'EntityEdit', - 'editgroup': 'Editgroup', - 'changelog_entry': 'ChangelogEntry' - } - - attribute_map = { - 'edit': 'edit', - 'editgroup': 'editgroup', - 'changelog_entry': 'changelog_entry' - } - - def __init__(self, edit=None, editgroup=None, changelog_entry=None): # noqa: E501 - """EntityHistoryEntry - a model defined in OpenAPI""" # noqa: E501 - - self._edit = None - self._editgroup = None - self._changelog_entry = None - self.discriminator = None - - self.edit = edit - self.editgroup = editgroup - self.changelog_entry = changelog_entry - - @property - def edit(self): - """Gets the edit of this EntityHistoryEntry. # noqa: E501 - - - :return: The edit of this EntityHistoryEntry. # noqa: E501 - :rtype: EntityEdit - """ - return self._edit - - @edit.setter - def edit(self, edit): - """Sets the edit of this EntityHistoryEntry. - - - :param edit: The edit of this EntityHistoryEntry. # noqa: E501 - :type: EntityEdit - """ - if edit is None: - raise ValueError("Invalid value for `edit`, must not be `None`") # noqa: E501 - - self._edit = edit - - @property - def editgroup(self): - """Gets the editgroup of this EntityHistoryEntry. # noqa: E501 - - - :return: The editgroup of this EntityHistoryEntry. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this EntityHistoryEntry. - - - :param editgroup: The editgroup of this EntityHistoryEntry. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def changelog_entry(self): - """Gets the changelog_entry of this EntityHistoryEntry. # noqa: E501 - - - :return: The changelog_entry of this EntityHistoryEntry. # noqa: E501 - :rtype: ChangelogEntry - """ - return self._changelog_entry - - @changelog_entry.setter - def changelog_entry(self, changelog_entry): - """Sets the changelog_entry of this EntityHistoryEntry. - - - :param changelog_entry: The changelog_entry of this EntityHistoryEntry. # noqa: E501 - :type: ChangelogEntry - """ - if changelog_entry is None: - raise ValueError("Invalid value for `changelog_entry`, must not be `None`") # noqa: E501 - - self._changelog_entry = changelog_entry - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EntityHistoryEntry): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/error_response.py b/python_openapi_client/fatcat_openapi_client/models/error_response.py deleted file mode 100644 index 3406c52e..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/error_response.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ErrorResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'success': 'bool', - 'error': 'str', - 'message': 'str' - } - - attribute_map = { - 'success': 'success', - 'error': 'error', - 'message': 'message' - } - - def __init__(self, success=None, error=None, message=None): # noqa: E501 - """ErrorResponse - a model defined in OpenAPI""" # noqa: E501 - - self._success = None - self._error = None - self._message = None - self.discriminator = None - - self.success = success - self.error = error - self.message = message - - @property - def success(self): - """Gets the success of this ErrorResponse. # noqa: E501 - - - :return: The success of this ErrorResponse. # noqa: E501 - :rtype: bool - """ - return self._success - - @success.setter - def success(self, success): - """Sets the success of this ErrorResponse. - - - :param success: The success of this ErrorResponse. # noqa: E501 - :type: bool - """ - if success is None: - raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 - - self._success = success - - @property - def error(self): - """Gets the error of this ErrorResponse. # noqa: E501 - - - :return: The error of this ErrorResponse. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ErrorResponse. - - - :param error: The error of this ErrorResponse. # noqa: E501 - :type: str - """ - if error is None: - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def message(self): - """Gets the message of this ErrorResponse. # noqa: E501 - - - :return: The message of this ErrorResponse. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ErrorResponse. - - - :param message: The message of this ErrorResponse. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ErrorResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py deleted file mode 100644 index b34f5401..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/file_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FileAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[FileEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """FileAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this FileAutoBatch. # noqa: E501 - - - :return: The editgroup of this FileAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this FileAutoBatch. - - - :param editgroup: The editgroup of this FileAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this FileAutoBatch. # noqa: E501 - - - :return: The entity_list of this FileAutoBatch. # noqa: E501 - :rtype: list[FileEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this FileAutoBatch. - - - :param entity_list: The entity_list of this FileAutoBatch. # noqa: E501 - :type: list[FileEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FileAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/file_entity.py b/python_openapi_client/fatcat_openapi_client/models/file_entity.py deleted file mode 100644 index d97a0a03..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/file_entity.py +++ /dev/null @@ -1,541 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.5.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FileEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'size': 'int', - 'md5': 'str', - 'sha1': 'str', - 'sha256': 'str', - 'urls': 'list[FileUrl]', - 'mimetype': 'str', - 'content_scope': 'str', - 'release_ids': 'list[str]', - 'releases': 'list[ReleaseEntity]' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'size': 'size', - 'md5': 'md5', - 'sha1': 'sha1', - 'sha256': 'sha256', - 'urls': 'urls', - 'mimetype': 'mimetype', - 'content_scope': 'content_scope', - 'release_ids': 'release_ids', - 'releases': 'releases' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, size=None, md5=None, sha1=None, sha256=None, urls=None, mimetype=None, content_scope=None, release_ids=None, releases=None): # noqa: E501 - """FileEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._size = None - self._md5 = None - self._sha1 = None - self._sha256 = None - self._urls = None - self._mimetype = None - self._content_scope = None - self._release_ids = None - self._releases = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if size is not None: - self.size = size - if md5 is not None: - self.md5 = md5 - if sha1 is not None: - self.sha1 = sha1 - if sha256 is not None: - self.sha256 = sha256 - if urls is not None: - self.urls = urls - if mimetype is not None: - self.mimetype = mimetype - if content_scope is not None: - self.content_scope = content_scope - if release_ids is not None: - self.release_ids = release_ids - if releases is not None: - self.releases = releases - - @property - def state(self): - """Gets the state of this FileEntity. # noqa: E501 - - - :return: The state of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this FileEntity. - - - :param state: The state of this FileEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this FileEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this FileEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this FileEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this FileEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this FileEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this FileEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this FileEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this FileEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this FileEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this FileEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this FileEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this FileEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this FileEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this FileEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this FileEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this FileEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this FileEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def size(self): - """Gets the size of this FileEntity. # noqa: E501 - - Size of file in bytes. Non-zero. # noqa: E501 - - :return: The size of this FileEntity. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FileEntity. - - Size of file in bytes. Non-zero. # noqa: E501 - - :param size: The size of this FileEntity. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def md5(self): - """Gets the md5 of this FileEntity. # noqa: E501 - - MD5 hash of data, in hex encoding # noqa: E501 - - :return: The md5 of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._md5 - - @md5.setter - def md5(self, md5): - """Sets the md5 of this FileEntity. - - MD5 hash of data, in hex encoding # noqa: E501 - - :param md5: The md5 of this FileEntity. # noqa: E501 - :type: str - """ - if md5 is not None and len(md5) > 32: - raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501 - if md5 is not None and len(md5) < 32: - raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501 - if md5 is not None and not re.search(r'[a-f0-9]{32}', md5): # noqa: E501 - raise ValueError(r"Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501 - - self._md5 = md5 - - @property - def sha1(self): - """Gets the sha1 of this FileEntity. # noqa: E501 - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :return: The sha1 of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._sha1 - - @sha1.setter - def sha1(self, sha1): - """Sets the sha1 of this FileEntity. - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :param sha1: The sha1 of this FileEntity. # noqa: E501 - :type: str - """ - if sha1 is not None and len(sha1) > 40: - raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501 - if sha1 is not None and len(sha1) < 40: - raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501 - if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 - - self._sha1 = sha1 - - @property - def sha256(self): - """Gets the sha256 of this FileEntity. # noqa: E501 - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :return: The sha256 of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._sha256 - - @sha256.setter - def sha256(self, sha256): - """Sets the sha256 of this FileEntity. - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :param sha256: The sha256 of this FileEntity. # noqa: E501 - :type: str - """ - if sha256 is not None and len(sha256) > 64: - raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501 - if sha256 is not None and len(sha256) < 64: - raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501 - if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 - - self._sha256 = sha256 - - @property - def urls(self): - """Gets the urls of this FileEntity. # noqa: E501 - - - :return: The urls of this FileEntity. # noqa: E501 - :rtype: list[FileUrl] - """ - return self._urls - - @urls.setter - def urls(self, urls): - """Sets the urls of this FileEntity. - - - :param urls: The urls of this FileEntity. # noqa: E501 - :type: list[FileUrl] - """ - - self._urls = urls - - @property - def mimetype(self): - """Gets the mimetype of this FileEntity. # noqa: E501 - - - :return: The mimetype of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._mimetype - - @mimetype.setter - def mimetype(self, mimetype): - """Sets the mimetype of this FileEntity. - - - :param mimetype: The mimetype of this FileEntity. # noqa: E501 - :type: str - """ - - self._mimetype = mimetype - - @property - def content_scope(self): - """Gets the content_scope of this FileEntity. # noqa: E501 - - - :return: The content_scope of this FileEntity. # noqa: E501 - :rtype: str - """ - return self._content_scope - - @content_scope.setter - def content_scope(self, content_scope): - """Sets the content_scope of this FileEntity. - - - :param content_scope: The content_scope of this FileEntity. # noqa: E501 - :type: str - """ - - self._content_scope = content_scope - - @property - def release_ids(self): - """Gets the release_ids of this FileEntity. # noqa: E501 - - Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). # noqa: E501 - - :return: The release_ids of this FileEntity. # noqa: E501 - :rtype: list[str] - """ - return self._release_ids - - @release_ids.setter - def release_ids(self, release_ids): - """Sets the release_ids of this FileEntity. - - Set of identifier of release entities this file represents a full manifestation of. Usually a single release, but some files contain content of multiple full releases (eg, an issue of a journal). # noqa: E501 - - :param release_ids: The release_ids of this FileEntity. # noqa: E501 - :type: list[str] - """ - - self._release_ids = release_ids - - @property - def releases(self): - """Gets the releases of this FileEntity. # noqa: E501 - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :return: The releases of this FileEntity. # noqa: E501 - :rtype: list[ReleaseEntity] - """ - return self._releases - - @releases.setter - def releases(self, releases): - """Sets the releases of this FileEntity. - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :param releases: The releases of this FileEntity. # noqa: E501 - :type: list[ReleaseEntity] - """ - - self._releases = releases - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FileEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/file_url.py b/python_openapi_client/fatcat_openapi_client/models/file_url.py deleted file mode 100644 index 6dc8ebe6..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/file_url.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FileUrl(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'url': 'str', - 'rel': 'str' - } - - attribute_map = { - 'url': 'url', - 'rel': 'rel' - } - - def __init__(self, url=None, rel=None): # noqa: E501 - """FileUrl - a model defined in OpenAPI""" # noqa: E501 - - self._url = None - self._rel = None - self.discriminator = None - - self.url = url - self.rel = rel - - @property - def url(self): - """Gets the url of this FileUrl. # noqa: E501 - - URL/URI pointing directly to a machine retrievable copy of this exact file. # noqa: E501 - - :return: The url of this FileUrl. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this FileUrl. - - URL/URI pointing directly to a machine retrievable copy of this exact file. # noqa: E501 - - :param url: The url of this FileUrl. # noqa: E501 - :type: str - """ - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def rel(self): - """Gets the rel of this FileUrl. # noqa: E501 - - Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values. # noqa: E501 - - :return: The rel of this FileUrl. # noqa: E501 - :rtype: str - """ - return self._rel - - @rel.setter - def rel(self, rel): - """Sets the rel of this FileUrl. - - Indicates type of host this URL points to. Eg, \"publisher\", \"repository\", \"webarchive\". See guide for list of acceptable values. # noqa: E501 - - :param rel: The rel of this FileUrl. # noqa: E501 - :type: str - """ - if rel is None: - raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501 - - self._rel = rel - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FileUrl): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py deleted file mode 100644 index d3a15279..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FilesetAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[FilesetEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """FilesetAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this FilesetAutoBatch. # noqa: E501 - - - :return: The editgroup of this FilesetAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this FilesetAutoBatch. - - - :param editgroup: The editgroup of this FilesetAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this FilesetAutoBatch. # noqa: E501 - - - :return: The entity_list of this FilesetAutoBatch. # noqa: E501 - :rtype: list[FilesetEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this FilesetAutoBatch. - - - :param entity_list: The entity_list of this FilesetAutoBatch. # noqa: E501 - :type: list[FilesetEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FilesetAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py deleted file mode 100644 index dfc0787a..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py +++ /dev/null @@ -1,411 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.5.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FilesetEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'content_scope': 'str', - 'manifest': 'list[FilesetFile]', - 'urls': 'list[FilesetUrl]', - 'release_ids': 'list[str]', - 'releases': 'list[ReleaseEntity]' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'content_scope': 'content_scope', - 'manifest': 'manifest', - 'urls': 'urls', - 'release_ids': 'release_ids', - 'releases': 'releases' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, content_scope=None, manifest=None, urls=None, release_ids=None, releases=None): # noqa: E501 - """FilesetEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._content_scope = None - self._manifest = None - self._urls = None - self._release_ids = None - self._releases = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if content_scope is not None: - self.content_scope = content_scope - if manifest is not None: - self.manifest = manifest - if urls is not None: - self.urls = urls - if release_ids is not None: - self.release_ids = release_ids - if releases is not None: - self.releases = releases - - @property - def state(self): - """Gets the state of this FilesetEntity. # noqa: E501 - - - :return: The state of this FilesetEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this FilesetEntity. - - - :param state: The state of this FilesetEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this FilesetEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this FilesetEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this FilesetEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this FilesetEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this FilesetEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this FilesetEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this FilesetEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this FilesetEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this FilesetEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this FilesetEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this FilesetEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this FilesetEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this FilesetEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this FilesetEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this FilesetEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this FilesetEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this FilesetEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this FilesetEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this FilesetEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this FilesetEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def content_scope(self): - """Gets the content_scope of this FilesetEntity. # noqa: E501 - - - :return: The content_scope of this FilesetEntity. # noqa: E501 - :rtype: str - """ - return self._content_scope - - @content_scope.setter - def content_scope(self, content_scope): - """Sets the content_scope of this FilesetEntity. - - - :param content_scope: The content_scope of this FilesetEntity. # noqa: E501 - :type: str - """ - - self._content_scope = content_scope - - @property - def manifest(self): - """Gets the manifest of this FilesetEntity. # noqa: E501 - - - :return: The manifest of this FilesetEntity. # noqa: E501 - :rtype: list[FilesetFile] - """ - return self._manifest - - @manifest.setter - def manifest(self, manifest): - """Sets the manifest of this FilesetEntity. - - - :param manifest: The manifest of this FilesetEntity. # noqa: E501 - :type: list[FilesetFile] - """ - - self._manifest = manifest - - @property - def urls(self): - """Gets the urls of this FilesetEntity. # noqa: E501 - - - :return: The urls of this FilesetEntity. # noqa: E501 - :rtype: list[FilesetUrl] - """ - return self._urls - - @urls.setter - def urls(self, urls): - """Sets the urls of this FilesetEntity. - - - :param urls: The urls of this FilesetEntity. # noqa: E501 - :type: list[FilesetUrl] - """ - - self._urls = urls - - @property - def release_ids(self): - """Gets the release_ids of this FilesetEntity. # noqa: E501 - - Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501 - - :return: The release_ids of this FilesetEntity. # noqa: E501 - :rtype: list[str] - """ - return self._release_ids - - @release_ids.setter - def release_ids(self, release_ids): - """Sets the release_ids of this FilesetEntity. - - Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501 - - :param release_ids: The release_ids of this FilesetEntity. # noqa: E501 - :type: list[str] - """ - - self._release_ids = release_ids - - @property - def releases(self): - """Gets the releases of this FilesetEntity. # noqa: E501 - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :return: The releases of this FilesetEntity. # noqa: E501 - :rtype: list[ReleaseEntity] - """ - return self._releases - - @releases.setter - def releases(self, releases): - """Sets the releases of this FilesetEntity. - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :param releases: The releases of this FilesetEntity. # noqa: E501 - :type: list[ReleaseEntity] - """ - - self._releases = releases - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FilesetEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py b/python_openapi_client/fatcat_openapi_client/models/fileset_file.py deleted file mode 100644 index 0741f9a5..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_file.py +++ /dev/null @@ -1,301 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.4.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FilesetFile(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'path': 'str', - 'size': 'int', - 'md5': 'str', - 'sha1': 'str', - 'sha256': 'str', - 'mimetype': 'str', - 'extra': 'dict(str, object)' - } - - attribute_map = { - 'path': 'path', - 'size': 'size', - 'md5': 'md5', - 'sha1': 'sha1', - 'sha256': 'sha256', - 'mimetype': 'mimetype', - 'extra': 'extra' - } - - def __init__(self, path=None, size=None, md5=None, sha1=None, sha256=None, mimetype=None, extra=None): # noqa: E501 - """FilesetFile - a model defined in OpenAPI""" # noqa: E501 - - self._path = None - self._size = None - self._md5 = None - self._sha1 = None - self._sha256 = None - self._mimetype = None - self._extra = None - self.discriminator = None - - self.path = path - self.size = size - if md5 is not None: - self.md5 = md5 - if sha1 is not None: - self.sha1 = sha1 - if sha256 is not None: - self.sha256 = sha256 - if mimetype is not None: - self.mimetype = mimetype - if extra is not None: - self.extra = extra - - @property - def path(self): - """Gets the path of this FilesetFile. # noqa: E501 - - Path name of file within this fileset (eg, directory) # noqa: E501 - - :return: The path of this FilesetFile. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this FilesetFile. - - Path name of file within this fileset (eg, directory) # noqa: E501 - - :param path: The path of this FilesetFile. # noqa: E501 - :type: str - """ - if path is None: - raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 - - self._path = path - - @property - def size(self): - """Gets the size of this FilesetFile. # noqa: E501 - - File size in bytes # noqa: E501 - - :return: The size of this FilesetFile. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FilesetFile. - - File size in bytes # noqa: E501 - - :param size: The size of this FilesetFile. # noqa: E501 - :type: int - """ - if size is None: - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def md5(self): - """Gets the md5 of this FilesetFile. # noqa: E501 - - MD5 hash of data, in hex encoding # noqa: E501 - - :return: The md5 of this FilesetFile. # noqa: E501 - :rtype: str - """ - return self._md5 - - @md5.setter - def md5(self, md5): - """Sets the md5 of this FilesetFile. - - MD5 hash of data, in hex encoding # noqa: E501 - - :param md5: The md5 of this FilesetFile. # noqa: E501 - :type: str - """ - if md5 is not None and len(md5) > 32: - raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501 - if md5 is not None and len(md5) < 32: - raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501 - if md5 is not None and not re.search(r'[a-f0-9]{32}', md5): # noqa: E501 - raise ValueError(r"Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501 - - self._md5 = md5 - - @property - def sha1(self): - """Gets the sha1 of this FilesetFile. # noqa: E501 - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :return: The sha1 of this FilesetFile. # noqa: E501 - :rtype: str - """ - return self._sha1 - - @sha1.setter - def sha1(self, sha1): - """Sets the sha1 of this FilesetFile. - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :param sha1: The sha1 of this FilesetFile. # noqa: E501 - :type: str - """ - if sha1 is not None and len(sha1) > 40: - raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501 - if sha1 is not None and len(sha1) < 40: - raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501 - if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 - - self._sha1 = sha1 - - @property - def sha256(self): - """Gets the sha256 of this FilesetFile. # noqa: E501 - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :return: The sha256 of this FilesetFile. # noqa: E501 - :rtype: str - """ - return self._sha256 - - @sha256.setter - def sha256(self, sha256): - """Sets the sha256 of this FilesetFile. - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :param sha256: The sha256 of this FilesetFile. # noqa: E501 - :type: str - """ - if sha256 is not None and len(sha256) > 64: - raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501 - if sha256 is not None and len(sha256) < 64: - raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501 - if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 - - self._sha256 = sha256 - - @property - def mimetype(self): - """Gets the mimetype of this FilesetFile. # noqa: E501 - - - :return: The mimetype of this FilesetFile. # noqa: E501 - :rtype: str - """ - return self._mimetype - - @mimetype.setter - def mimetype(self, mimetype): - """Sets the mimetype of this FilesetFile. - - - :param mimetype: The mimetype of this FilesetFile. # noqa: E501 - :type: str - """ - - self._mimetype = mimetype - - @property - def extra(self): - """Gets the extra of this FilesetFile. # noqa: E501 - - Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501 - - :return: The extra of this FilesetFile. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this FilesetFile. - - Free-form additional metadata about this specific file in the set. Eg, `original_url`. See guide for nomative (but unenforced) schema fields. # noqa: E501 - - :param extra: The extra of this FilesetFile. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FilesetFile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_url.py b/python_openapi_client/fatcat_openapi_client/models/fileset_url.py deleted file mode 100644 index cde1119c..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_url.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class FilesetUrl(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'url': 'str', - 'rel': 'str' - } - - attribute_map = { - 'url': 'url', - 'rel': 'rel' - } - - def __init__(self, url=None, rel=None): # noqa: E501 - """FilesetUrl - a model defined in OpenAPI""" # noqa: E501 - - self._url = None - self._rel = None - self.discriminator = None - - self.url = url - self.rel = rel - - @property - def url(self): - """Gets the url of this FilesetUrl. # noqa: E501 - - - :return: The url of this FilesetUrl. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this FilesetUrl. - - - :param url: The url of this FilesetUrl. # noqa: E501 - :type: str - """ - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def rel(self): - """Gets the rel of this FilesetUrl. # noqa: E501 - - Indicates type of host this URL points to. See guide for list of acceptable values. # noqa: E501 - - :return: The rel of this FilesetUrl. # noqa: E501 - :rtype: str - """ - return self._rel - - @rel.setter - def rel(self, rel): - """Sets the rel of this FilesetUrl. - - Indicates type of host this URL points to. See guide for list of acceptable values. # noqa: E501 - - :param rel: The rel of this FilesetUrl. # noqa: E501 - :type: str - """ - if rel is None: - raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501 - - self._rel = rel - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FilesetUrl): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_abstract.py b/python_openapi_client/fatcat_openapi_client/models/release_abstract.py deleted file mode 100644 index c6c7aab7..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_abstract.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseAbstract(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'sha1': 'str', - 'content': 'str', - 'mimetype': 'str', - 'lang': 'str' - } - - attribute_map = { - 'sha1': 'sha1', - 'content': 'content', - 'mimetype': 'mimetype', - 'lang': 'lang' - } - - def __init__(self, sha1=None, content=None, mimetype=None, lang=None): # noqa: E501 - """ReleaseAbstract - a model defined in OpenAPI""" # noqa: E501 - - self._sha1 = None - self._content = None - self._mimetype = None - self._lang = None - self.discriminator = None - - if sha1 is not None: - self.sha1 = sha1 - if content is not None: - self.content = content - if mimetype is not None: - self.mimetype = mimetype - if lang is not None: - self.lang = lang - - @property - def sha1(self): - """Gets the sha1 of this ReleaseAbstract. # noqa: E501 - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :return: The sha1 of this ReleaseAbstract. # noqa: E501 - :rtype: str - """ - return self._sha1 - - @sha1.setter - def sha1(self, sha1): - """Sets the sha1 of this ReleaseAbstract. - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :param sha1: The sha1 of this ReleaseAbstract. # noqa: E501 - :type: str - """ - if sha1 is not None and len(sha1) > 40: - raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501 - if sha1 is not None and len(sha1) < 40: - raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501 - if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 - - self._sha1 = sha1 - - @property - def content(self): - """Gets the content of this ReleaseAbstract. # noqa: E501 - - Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. # noqa: E501 - - :return: The content of this ReleaseAbstract. # noqa: E501 - :rtype: str - """ - return self._content - - @content.setter - def content(self, content): - """Sets the content of this ReleaseAbstract. - - Abstract content. May be encoded, as per `mimetype` field, but only string/text content may be included. # noqa: E501 - - :param content: The content of this ReleaseAbstract. # noqa: E501 - :type: str - """ - - self._content = content - - @property - def mimetype(self): - """Gets the mimetype of this ReleaseAbstract. # noqa: E501 - - Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. # noqa: E501 - - :return: The mimetype of this ReleaseAbstract. # noqa: E501 - :rtype: str - """ - return self._mimetype - - @mimetype.setter - def mimetype(self, mimetype): - """Sets the mimetype of this ReleaseAbstract. - - Mimetype of abstract contents. `text/plain` is the default if content isn't encoded. # noqa: E501 - - :param mimetype: The mimetype of this ReleaseAbstract. # noqa: E501 - :type: str - """ - - self._mimetype = mimetype - - @property - def lang(self): - """Gets the lang of this ReleaseAbstract. # noqa: E501 - - ISO language code of the abstract. Same semantics as release `language` field. # noqa: E501 - - :return: The lang of this ReleaseAbstract. # noqa: E501 - :rtype: str - """ - return self._lang - - @lang.setter - def lang(self, lang): - """Sets the lang of this ReleaseAbstract. - - ISO language code of the abstract. Same semantics as release `language` field. # noqa: E501 - - :param lang: The lang of this ReleaseAbstract. # noqa: E501 - :type: str - """ - - self._lang = lang - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseAbstract): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py deleted file mode 100644 index 9d1f6bbc..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[ReleaseEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """ReleaseAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this ReleaseAutoBatch. # noqa: E501 - - - :return: The editgroup of this ReleaseAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this ReleaseAutoBatch. - - - :param editgroup: The editgroup of this ReleaseAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this ReleaseAutoBatch. # noqa: E501 - - - :return: The entity_list of this ReleaseAutoBatch. # noqa: E501 - :rtype: list[ReleaseEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this ReleaseAutoBatch. - - - :param entity_list: The entity_list of this ReleaseAutoBatch. # noqa: E501 - :type: list[ReleaseEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_contrib.py b/python_openapi_client/fatcat_openapi_client/models/release_contrib.py deleted file mode 100644 index f2de29df..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_contrib.py +++ /dev/null @@ -1,343 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseContrib(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'index': 'int', - 'creator_id': 'str', - 'creator': 'CreatorEntity', - 'raw_name': 'str', - 'given_name': 'str', - 'surname': 'str', - 'role': 'str', - 'raw_affiliation': 'str', - 'extra': 'dict(str, object)' - } - - attribute_map = { - 'index': 'index', - 'creator_id': 'creator_id', - 'creator': 'creator', - 'raw_name': 'raw_name', - 'given_name': 'given_name', - 'surname': 'surname', - 'role': 'role', - 'raw_affiliation': 'raw_affiliation', - 'extra': 'extra' - } - - def __init__(self, index=None, creator_id=None, creator=None, raw_name=None, given_name=None, surname=None, role=None, raw_affiliation=None, extra=None): # noqa: E501 - """ReleaseContrib - a model defined in OpenAPI""" # noqa: E501 - - self._index = None - self._creator_id = None - self._creator = None - self._raw_name = None - self._given_name = None - self._surname = None - self._role = None - self._raw_affiliation = None - self._extra = None - self.discriminator = None - - if index is not None: - self.index = index - if creator_id is not None: - self.creator_id = creator_id - if creator is not None: - self.creator = creator - if raw_name is not None: - self.raw_name = raw_name - if given_name is not None: - self.given_name = given_name - if surname is not None: - self.surname = surname - if role is not None: - self.role = role - if raw_affiliation is not None: - self.raw_affiliation = raw_affiliation - if extra is not None: - self.extra = extra - - @property - def index(self): - """Gets the index of this ReleaseContrib. # noqa: E501 - - Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. # noqa: E501 - - :return: The index of this ReleaseContrib. # noqa: E501 - :rtype: int - """ - return self._index - - @index.setter - def index(self, index): - """Sets the index of this ReleaseContrib. - - Internally assigned zero-indexed sequence number of contribution. Authors should come first; this encodes the order of attriubtion. # noqa: E501 - - :param index: The index of this ReleaseContrib. # noqa: E501 - :type: int - """ - - self._index = index - - @property - def creator_id(self): - """Gets the creator_id of this ReleaseContrib. # noqa: E501 - - If known, indicates the creator entity this contribution was made by. # noqa: E501 - - :return: The creator_id of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._creator_id - - @creator_id.setter - def creator_id(self, creator_id): - """Sets the creator_id of this ReleaseContrib. - - If known, indicates the creator entity this contribution was made by. # noqa: E501 - - :param creator_id: The creator_id of this ReleaseContrib. # noqa: E501 - :type: str - """ - if creator_id is not None and len(creator_id) > 26: - raise ValueError("Invalid value for `creator_id`, length must be less than or equal to `26`") # noqa: E501 - if creator_id is not None and len(creator_id) < 26: - raise ValueError("Invalid value for `creator_id`, length must be greater than or equal to `26`") # noqa: E501 - if creator_id is not None and not re.search(r'[a-zA-Z2-7]{26}', creator_id): # noqa: E501 - raise ValueError(r"Invalid value for `creator_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._creator_id = creator_id - - @property - def creator(self): - """Gets the creator of this ReleaseContrib. # noqa: E501 - - - :return: The creator of this ReleaseContrib. # noqa: E501 - :rtype: CreatorEntity - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this ReleaseContrib. - - - :param creator: The creator of this ReleaseContrib. # noqa: E501 - :type: CreatorEntity - """ - - self._creator = creator - - @property - def raw_name(self): - """Gets the raw_name of this ReleaseContrib. # noqa: E501 - - Full name of the contributor as typeset in the release. # noqa: E501 - - :return: The raw_name of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._raw_name - - @raw_name.setter - def raw_name(self, raw_name): - """Sets the raw_name of this ReleaseContrib. - - Full name of the contributor as typeset in the release. # noqa: E501 - - :param raw_name: The raw_name of this ReleaseContrib. # noqa: E501 - :type: str - """ - - self._raw_name = raw_name - - @property - def given_name(self): - """Gets the given_name of this ReleaseContrib. # noqa: E501 - - In English commonly the first name, but ordering is context and culture specific. # noqa: E501 - - :return: The given_name of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this ReleaseContrib. - - In English commonly the first name, but ordering is context and culture specific. # noqa: E501 - - :param given_name: The given_name of this ReleaseContrib. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def surname(self): - """Gets the surname of this ReleaseContrib. # noqa: E501 - - In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501 - - :return: The surname of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._surname - - @surname.setter - def surname(self, surname): - """Sets the surname of this ReleaseContrib. - - In English commonly the last, or family name, but ordering is context and culture specific. # noqa: E501 - - :param surname: The surname of this ReleaseContrib. # noqa: E501 - :type: str - """ - - self._surname = surname - - @property - def role(self): - """Gets the role of this ReleaseContrib. # noqa: E501 - - Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. # noqa: E501 - - :return: The role of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this ReleaseContrib. - - Short string (slug) indicating type of contribution (eg, \"author\", \"translator\"). See guide for list of accpeted values. # noqa: E501 - - :param role: The role of this ReleaseContrib. # noqa: E501 - :type: str - """ - - self._role = role - - @property - def raw_affiliation(self): - """Gets the raw_affiliation of this ReleaseContrib. # noqa: E501 - - Raw affiliation string as displayed in text # noqa: E501 - - :return: The raw_affiliation of this ReleaseContrib. # noqa: E501 - :rtype: str - """ - return self._raw_affiliation - - @raw_affiliation.setter - def raw_affiliation(self, raw_affiliation): - """Sets the raw_affiliation of this ReleaseContrib. - - Raw affiliation string as displayed in text # noqa: E501 - - :param raw_affiliation: The raw_affiliation of this ReleaseContrib. # noqa: E501 - :type: str - """ - - self._raw_affiliation = raw_affiliation - - @property - def extra(self): - """Gets the extra of this ReleaseContrib. # noqa: E501 - - Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. # noqa: E501 - - :return: The extra of this ReleaseContrib. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this ReleaseContrib. - - Additional free-form JSON metadata about this contributor/contribution. See guide for normative schema. # noqa: E501 - - :param extra: The extra of this ReleaseContrib. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseContrib): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_entity.py b/python_openapi_client/fatcat_openapi_client/models/release_entity.py deleted file mode 100644 index a88124d4..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_entity.py +++ /dev/null @@ -1,1052 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'title': 'str', - 'subtitle': 'str', - 'original_title': 'str', - 'work_id': 'str', - 'container': 'ContainerEntity', - 'files': 'list[FileEntity]', - 'filesets': 'list[FilesetEntity]', - 'webcaptures': 'list[WebcaptureEntity]', - 'container_id': 'str', - 'release_type': 'str', - 'release_stage': 'str', - 'release_date': 'date', - 'release_year': 'int', - 'withdrawn_status': 'str', - 'withdrawn_date': 'date', - 'withdrawn_year': 'int', - 'ext_ids': 'ReleaseExtIds', - 'volume': 'str', - 'issue': 'str', - 'pages': 'str', - 'number': 'str', - 'version': 'str', - 'publisher': 'str', - 'language': 'str', - 'license_slug': 'str', - 'contribs': 'list[ReleaseContrib]', - 'refs': 'list[ReleaseRef]', - 'abstracts': 'list[ReleaseAbstract]' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'title': 'title', - 'subtitle': 'subtitle', - 'original_title': 'original_title', - 'work_id': 'work_id', - 'container': 'container', - 'files': 'files', - 'filesets': 'filesets', - 'webcaptures': 'webcaptures', - 'container_id': 'container_id', - 'release_type': 'release_type', - 'release_stage': 'release_stage', - 'release_date': 'release_date', - 'release_year': 'release_year', - 'withdrawn_status': 'withdrawn_status', - 'withdrawn_date': 'withdrawn_date', - 'withdrawn_year': 'withdrawn_year', - 'ext_ids': 'ext_ids', - 'volume': 'volume', - 'issue': 'issue', - 'pages': 'pages', - 'number': 'number', - 'version': 'version', - 'publisher': 'publisher', - 'language': 'language', - 'license_slug': 'license_slug', - 'contribs': 'contribs', - 'refs': 'refs', - 'abstracts': 'abstracts' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, title=None, subtitle=None, original_title=None, work_id=None, container=None, files=None, filesets=None, webcaptures=None, container_id=None, release_type=None, release_stage=None, release_date=None, release_year=None, withdrawn_status=None, withdrawn_date=None, withdrawn_year=None, ext_ids=None, volume=None, issue=None, pages=None, number=None, version=None, publisher=None, language=None, license_slug=None, contribs=None, refs=None, abstracts=None): # noqa: E501 - """ReleaseEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._title = None - self._subtitle = None - self._original_title = None - self._work_id = None - self._container = None - self._files = None - self._filesets = None - self._webcaptures = None - self._container_id = None - self._release_type = None - self._release_stage = None - self._release_date = None - self._release_year = None - self._withdrawn_status = None - self._withdrawn_date = None - self._withdrawn_year = None - self._ext_ids = None - self._volume = None - self._issue = None - self._pages = None - self._number = None - self._version = None - self._publisher = None - self._language = None - self._license_slug = None - self._contribs = None - self._refs = None - self._abstracts = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if title is not None: - self.title = title - if subtitle is not None: - self.subtitle = subtitle - if original_title is not None: - self.original_title = original_title - if work_id is not None: - self.work_id = work_id - if container is not None: - self.container = container - if files is not None: - self.files = files - if filesets is not None: - self.filesets = filesets - if webcaptures is not None: - self.webcaptures = webcaptures - if container_id is not None: - self.container_id = container_id - if release_type is not None: - self.release_type = release_type - if release_stage is not None: - self.release_stage = release_stage - if release_date is not None: - self.release_date = release_date - if release_year is not None: - self.release_year = release_year - if withdrawn_status is not None: - self.withdrawn_status = withdrawn_status - if withdrawn_date is not None: - self.withdrawn_date = withdrawn_date - if withdrawn_year is not None: - self.withdrawn_year = withdrawn_year - self.ext_ids = ext_ids - if volume is not None: - self.volume = volume - if issue is not None: - self.issue = issue - if pages is not None: - self.pages = pages - if number is not None: - self.number = number - if version is not None: - self.version = version - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license_slug is not None: - self.license_slug = license_slug - if contribs is not None: - self.contribs = contribs - if refs is not None: - self.refs = refs - if abstracts is not None: - self.abstracts = abstracts - - @property - def state(self): - """Gets the state of this ReleaseEntity. # noqa: E501 - - - :return: The state of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ReleaseEntity. - - - :param state: The state of this ReleaseEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this ReleaseEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this ReleaseEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this ReleaseEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this ReleaseEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this ReleaseEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this ReleaseEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this ReleaseEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this ReleaseEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this ReleaseEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this ReleaseEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this ReleaseEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this ReleaseEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this ReleaseEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this ReleaseEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this ReleaseEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this ReleaseEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this ReleaseEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def title(self): - """Gets the title of this ReleaseEntity. # noqa: E501 - - Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. # noqa: E501 - - :return: The title of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ReleaseEntity. - - Required for valid entities. The title used in citations and for display. Sometimes the English translation of title e even if release content is not English. # noqa: E501 - - :param title: The title of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def subtitle(self): - """Gets the subtitle of this ReleaseEntity. # noqa: E501 - - Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. # noqa: E501 - - :return: The subtitle of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._subtitle - - @subtitle.setter - def subtitle(self, subtitle): - """Sets the subtitle of this ReleaseEntity. - - Subtitle of release. In many cases, better to merge with title than include as separate field (unless combined title would be very long). See guide for details. # noqa: E501 - - :param subtitle: The subtitle of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._subtitle = subtitle - - @property - def original_title(self): - """Gets the original_title of this ReleaseEntity. # noqa: E501 - - Title in original language if `title` field has been translated. See guide for details. # noqa: E501 - - :return: The original_title of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._original_title - - @original_title.setter - def original_title(self, original_title): - """Sets the original_title of this ReleaseEntity. - - Title in original language if `title` field has been translated. See guide for details. # noqa: E501 - - :param original_title: The original_title of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._original_title = original_title - - @property - def work_id(self): - """Gets the work_id of this ReleaseEntity. # noqa: E501 - - Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. # noqa: E501 - - :return: The work_id of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._work_id - - @work_id.setter - def work_id(self, work_id): - """Sets the work_id of this ReleaseEntity. - - Identifier of work this release is part of. In creation (POST) requests, a work entity will be created automatically if this field is not set. # noqa: E501 - - :param work_id: The work_id of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._work_id = work_id - - @property - def container(self): - """Gets the container of this ReleaseEntity. # noqa: E501 - - - :return: The container of this ReleaseEntity. # noqa: E501 - :rtype: ContainerEntity - """ - return self._container - - @container.setter - def container(self, container): - """Sets the container of this ReleaseEntity. - - - :param container: The container of this ReleaseEntity. # noqa: E501 - :type: ContainerEntity - """ - - self._container = container - - @property - def files(self): - """Gets the files of this ReleaseEntity. # noqa: E501 - - Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :return: The files of this ReleaseEntity. # noqa: E501 - :rtype: list[FileEntity] - """ - return self._files - - @files.setter - def files(self, files): - """Sets the files of this ReleaseEntity. - - Complete file entities identified by `file_ids` field. Only included in GET responses when `files` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :param files: The files of this ReleaseEntity. # noqa: E501 - :type: list[FileEntity] - """ - - self._files = files - - @property - def filesets(self): - """Gets the filesets of this ReleaseEntity. # noqa: E501 - - Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :return: The filesets of this ReleaseEntity. # noqa: E501 - :rtype: list[FilesetEntity] - """ - return self._filesets - - @filesets.setter - def filesets(self, filesets): - """Sets the filesets of this ReleaseEntity. - - Complete file entities identified by `filesets_ids` field. Only included in GET responses when `filesets` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :param filesets: The filesets of this ReleaseEntity. # noqa: E501 - :type: list[FilesetEntity] - """ - - self._filesets = filesets - - @property - def webcaptures(self): - """Gets the webcaptures of this ReleaseEntity. # noqa: E501 - - Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :return: The webcaptures of this ReleaseEntity. # noqa: E501 - :rtype: list[WebcaptureEntity] - """ - return self._webcaptures - - @webcaptures.setter - def webcaptures(self, webcaptures): - """Sets the webcaptures of this ReleaseEntity. - - Complete webcapture entities identified by `webcapture_ids` field. Only included in GET responses when `webcaptures` included in `expand` parameter; ignored in PUT or POST requests. # noqa: E501 - - :param webcaptures: The webcaptures of this ReleaseEntity. # noqa: E501 - :type: list[WebcaptureEntity] - """ - - self._webcaptures = webcaptures - - @property - def container_id(self): - """Gets the container_id of this ReleaseEntity. # noqa: E501 - - Used to link this release to a container entity that the release was published as part of. # noqa: E501 - - :return: The container_id of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this ReleaseEntity. - - Used to link this release to a container entity that the release was published as part of. # noqa: E501 - - :param container_id: The container_id of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._container_id = container_id - - @property - def release_type(self): - """Gets the release_type of this ReleaseEntity. # noqa: E501 - - \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501 - - :return: The release_type of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._release_type - - @release_type.setter - def release_type(self, release_type): - """Sets the release_type of this ReleaseEntity. - - \"Type\" or \"medium\" that this release is published as. See guide for valid values. # noqa: E501 - - :param release_type: The release_type of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._release_type = release_type - - @property - def release_stage(self): - """Gets the release_stage of this ReleaseEntity. # noqa: E501 - - The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501 - - :return: The release_stage of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._release_stage - - @release_stage.setter - def release_stage(self, release_stage): - """Sets the release_stage of this ReleaseEntity. - - The stage of publication of this specific release. See guide for valid values and semantics. # noqa: E501 - - :param release_stage: The release_stage of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._release_stage = release_stage - - @property - def release_date(self): - """Gets the release_date of this ReleaseEntity. # noqa: E501 - - Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. # noqa: E501 - - :return: The release_date of this ReleaseEntity. # noqa: E501 - :rtype: date - """ - return self._release_date - - @release_date.setter - def release_date(self, release_date): - """Sets the release_date of this ReleaseEntity. - - Full date when this release was formally published. ISO format, like `2019-03-05`. See guide for semantics. # noqa: E501 - - :param release_date: The release_date of this ReleaseEntity. # noqa: E501 - :type: date - """ - - self._release_date = release_date - - @property - def release_year(self): - """Gets the release_year of this ReleaseEntity. # noqa: E501 - - Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. # noqa: E501 - - :return: The release_year of this ReleaseEntity. # noqa: E501 - :rtype: int - """ - return self._release_year - - @release_year.setter - def release_year(self, release_year): - """Sets the release_year of this ReleaseEntity. - - Year when this release was formally published. Must match `release_date` if that field is set; this field exists because sometimes only the year is known. # noqa: E501 - - :param release_year: The release_year of this ReleaseEntity. # noqa: E501 - :type: int - """ - - self._release_year = release_year - - @property - def withdrawn_status(self): - """Gets the withdrawn_status of this ReleaseEntity. # noqa: E501 - - Type of withdrawl or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). # noqa: E501 - - :return: The withdrawn_status of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._withdrawn_status - - @withdrawn_status.setter - def withdrawn_status(self, withdrawn_status): - """Sets the withdrawn_status of this ReleaseEntity. - - Type of withdrawl or retraction of this release, if applicable. If release has not been withdrawn, should be `null` (aka, not set, not the string \"null\" or an empty string). # noqa: E501 - - :param withdrawn_status: The withdrawn_status of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._withdrawn_status = withdrawn_status - - @property - def withdrawn_date(self): - """Gets the withdrawn_date of this ReleaseEntity. # noqa: E501 - - Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 - - :return: The withdrawn_date of this ReleaseEntity. # noqa: E501 - :rtype: date - """ - return self._withdrawn_date - - @withdrawn_date.setter - def withdrawn_date(self, withdrawn_date): - """Sets the withdrawn_date of this ReleaseEntity. - - Full date when this release was formally withdrawn (if applicable). ISO format, like `release_date`. # noqa: E501 - - :param withdrawn_date: The withdrawn_date of this ReleaseEntity. # noqa: E501 - :type: date - """ - - self._withdrawn_date = withdrawn_date - - @property - def withdrawn_year(self): - """Gets the withdrawn_year of this ReleaseEntity. # noqa: E501 - - Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501 - - :return: The withdrawn_year of this ReleaseEntity. # noqa: E501 - :rtype: int - """ - return self._withdrawn_year - - @withdrawn_year.setter - def withdrawn_year(self, withdrawn_year): - """Sets the withdrawn_year of this ReleaseEntity. - - Year corresponding with `withdrawn_date` like `release_year`/`release_date`. # noqa: E501 - - :param withdrawn_year: The withdrawn_year of this ReleaseEntity. # noqa: E501 - :type: int - """ - - self._withdrawn_year = withdrawn_year - - @property - def ext_ids(self): - """Gets the ext_ids of this ReleaseEntity. # noqa: E501 - - - :return: The ext_ids of this ReleaseEntity. # noqa: E501 - :rtype: ReleaseExtIds - """ - return self._ext_ids - - @ext_ids.setter - def ext_ids(self, ext_ids): - """Sets the ext_ids of this ReleaseEntity. - - - :param ext_ids: The ext_ids of this ReleaseEntity. # noqa: E501 - :type: ReleaseExtIds - """ - if ext_ids is None: - raise ValueError("Invalid value for `ext_ids`, must not be `None`") # noqa: E501 - - self._ext_ids = ext_ids - - @property - def volume(self): - """Gets the volume of this ReleaseEntity. # noqa: E501 - - Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. # noqa: E501 - - :return: The volume of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._volume - - @volume.setter - def volume(self, volume): - """Sets the volume of this ReleaseEntity. - - Volume number of container that this release was published in. Often corresponds to the \"Nth\" year of publication, but can be any string. See guide. # noqa: E501 - - :param volume: The volume of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._volume = volume - - @property - def issue(self): - """Gets the issue of this ReleaseEntity. # noqa: E501 - - Issue number of volume/container that this release was published in. Sometimes coresponds to a month number in the year, but can be any string. See guide. # noqa: E501 - - :return: The issue of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._issue - - @issue.setter - def issue(self, issue): - """Sets the issue of this ReleaseEntity. - - Issue number of volume/container that this release was published in. Sometimes coresponds to a month number in the year, but can be any string. See guide. # noqa: E501 - - :param issue: The issue of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._issue = issue - - @property - def pages(self): - """Gets the pages of this ReleaseEntity. # noqa: E501 - - Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. # noqa: E501 - - :return: The pages of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._pages - - @pages.setter - def pages(self, pages): - """Sets the pages of this ReleaseEntity. - - Either a single page number (\"first page\") or a range of pages separated by a dash (\"-\"). See guide for details. # noqa: E501 - - :param pages: The pages of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._pages = pages - - @property - def number(self): - """Gets the number of this ReleaseEntity. # noqa: E501 - - For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501 - - :return: The number of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._number - - @number.setter - def number(self, number): - """Sets the number of this ReleaseEntity. - - For, eg, technical reports, which are published in series or assigned some other institutional or container-specific identifier. # noqa: E501 - - :param number: The number of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._number = number - - @property - def version(self): - """Gets the version of this ReleaseEntity. # noqa: E501 - - For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501 - - :return: The version of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this ReleaseEntity. - - For, eg, updated technical reports or software packages, where the version string may be the only field disambiguating between releases. # noqa: E501 - - :param version: The version of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def publisher(self): - """Gets the publisher of this ReleaseEntity. # noqa: E501 - - Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. # noqa: E501 - - :return: The publisher of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this ReleaseEntity. - - Name, usually English, of the entity or institution responsible for publication of this release. Not necessarily the imprint/brand. See guide. # noqa: E501 - - :param publisher: The publisher of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this ReleaseEntity. # noqa: E501 - - Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. # noqa: E501 - - :return: The language of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this ReleaseEntity. - - Primary language of the content of the full release. Two-letter RFC1766/ISO639-1 language code, with some custom extensions/additions. See guide. # noqa: E501 - - :param language: The language of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._language = language - - @property - def license_slug(self): - """Gets the license_slug of this ReleaseEntity. # noqa: E501 - - Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501 - - :return: The license_slug of this ReleaseEntity. # noqa: E501 - :rtype: str - """ - return self._license_slug - - @license_slug.setter - def license_slug(self, license_slug): - """Sets the license_slug of this ReleaseEntity. - - Short string (slug) name of license under which release is openly published (if applicable). # noqa: E501 - - :param license_slug: The license_slug of this ReleaseEntity. # noqa: E501 - :type: str - """ - - self._license_slug = license_slug - - @property - def contribs(self): - """Gets the contribs of this ReleaseEntity. # noqa: E501 - - - :return: The contribs of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseContrib] - """ - return self._contribs - - @contribs.setter - def contribs(self, contribs): - """Sets the contribs of this ReleaseEntity. - - - :param contribs: The contribs of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseContrib] - """ - - self._contribs = contribs - - @property - def refs(self): - """Gets the refs of this ReleaseEntity. # noqa: E501 - - - :return: The refs of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseRef] - """ - return self._refs - - @refs.setter - def refs(self, refs): - """Sets the refs of this ReleaseEntity. - - - :param refs: The refs of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseRef] - """ - - self._refs = refs - - @property - def abstracts(self): - """Gets the abstracts of this ReleaseEntity. # noqa: E501 - - - :return: The abstracts of this ReleaseEntity. # noqa: E501 - :rtype: list[ReleaseAbstract] - """ - return self._abstracts - - @abstracts.setter - def abstracts(self, abstracts): - """Sets the abstracts of this ReleaseEntity. - - - :param abstracts: The abstracts of this ReleaseEntity. # noqa: E501 - :type: list[ReleaseAbstract] - """ - - self._abstracts = abstracts - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py b/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py deleted file mode 100644 index 2f46a3b8..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_ext_ids.py +++ /dev/null @@ -1,479 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.4.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseExtIds(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'doi': 'str', - 'wikidata_qid': 'str', - 'isbn13': 'str', - 'pmid': 'str', - 'pmcid': 'str', - 'core': 'str', - 'arxiv': 'str', - 'jstor': 'str', - 'ark': 'str', - 'mag': 'str', - 'doaj': 'str', - 'dblp': 'str', - 'oai': 'str', - 'hdl': 'str' - } - - attribute_map = { - 'doi': 'doi', - 'wikidata_qid': 'wikidata_qid', - 'isbn13': 'isbn13', - 'pmid': 'pmid', - 'pmcid': 'pmcid', - 'core': 'core', - 'arxiv': 'arxiv', - 'jstor': 'jstor', - 'ark': 'ark', - 'mag': 'mag', - 'doaj': 'doaj', - 'dblp': 'dblp', - 'oai': 'oai', - 'hdl': 'hdl' - } - - def __init__(self, doi=None, wikidata_qid=None, isbn13=None, pmid=None, pmcid=None, core=None, arxiv=None, jstor=None, ark=None, mag=None, doaj=None, dblp=None, oai=None, hdl=None): # noqa: E501 - """ReleaseExtIds - a model defined in OpenAPI""" # noqa: E501 - - self._doi = None - self._wikidata_qid = None - self._isbn13 = None - self._pmid = None - self._pmcid = None - self._core = None - self._arxiv = None - self._jstor = None - self._ark = None - self._mag = None - self._doaj = None - self._dblp = None - self._oai = None - self._hdl = None - self.discriminator = None - - if doi is not None: - self.doi = doi - if wikidata_qid is not None: - self.wikidata_qid = wikidata_qid - if isbn13 is not None: - self.isbn13 = isbn13 - if pmid is not None: - self.pmid = pmid - if pmcid is not None: - self.pmcid = pmcid - if core is not None: - self.core = core - if arxiv is not None: - self.arxiv = arxiv - if jstor is not None: - self.jstor = jstor - if ark is not None: - self.ark = ark - if mag is not None: - self.mag = mag - if doaj is not None: - self.doaj = doaj - if dblp is not None: - self.dblp = dblp - if oai is not None: - self.oai = oai - if hdl is not None: - self.hdl = hdl - - @property - def doi(self): - """Gets the doi of this ReleaseExtIds. # noqa: E501 - - Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ # noqa: E501 - - :return: The doi of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this ReleaseExtIds. - - Digital Object Identifier (DOI), mostly for published papers and datasets. Should be registered and resolvable via https://doi.org/ # noqa: E501 - - :param doi: The doi of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def wikidata_qid(self): - """Gets the wikidata_qid of this ReleaseExtIds. # noqa: E501 - - Wikidata entity QID # noqa: E501 - - :return: The wikidata_qid of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._wikidata_qid - - @wikidata_qid.setter - def wikidata_qid(self, wikidata_qid): - """Sets the wikidata_qid of this ReleaseExtIds. - - Wikidata entity QID # noqa: E501 - - :param wikidata_qid: The wikidata_qid of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._wikidata_qid = wikidata_qid - - @property - def isbn13(self): - """Gets the isbn13 of this ReleaseExtIds. # noqa: E501 - - ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. # noqa: E501 - - :return: The isbn13 of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._isbn13 - - @isbn13.setter - def isbn13(self, isbn13): - """Sets the isbn13 of this ReleaseExtIds. - - ISBN-13, for books. Usually not set for chapters. ISBN-10 should be converted to ISBN-13. # noqa: E501 - - :param isbn13: The isbn13 of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._isbn13 = isbn13 - - @property - def pmid(self): - """Gets the pmid of this ReleaseExtIds. # noqa: E501 - - PubMed Identifier # noqa: E501 - - :return: The pmid of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._pmid - - @pmid.setter - def pmid(self, pmid): - """Sets the pmid of this ReleaseExtIds. - - PubMed Identifier # noqa: E501 - - :param pmid: The pmid of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._pmid = pmid - - @property - def pmcid(self): - """Gets the pmcid of this ReleaseExtIds. # noqa: E501 - - PubMed Central Identifier # noqa: E501 - - :return: The pmcid of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._pmcid - - @pmcid.setter - def pmcid(self, pmcid): - """Sets the pmcid of this ReleaseExtIds. - - PubMed Central Identifier # noqa: E501 - - :param pmcid: The pmcid of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._pmcid = pmcid - - @property - def core(self): - """Gets the core of this ReleaseExtIds. # noqa: E501 - - CORE (https://core.ac.uk) identifier # noqa: E501 - - :return: The core of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._core - - @core.setter - def core(self, core): - """Sets the core of this ReleaseExtIds. - - CORE (https://core.ac.uk) identifier # noqa: E501 - - :param core: The core of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._core = core - - @property - def arxiv(self): - """Gets the arxiv of this ReleaseExtIds. # noqa: E501 - - arXiv (https://arxiv.org) identifier; must include version # noqa: E501 - - :return: The arxiv of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._arxiv - - @arxiv.setter - def arxiv(self, arxiv): - """Sets the arxiv of this ReleaseExtIds. - - arXiv (https://arxiv.org) identifier; must include version # noqa: E501 - - :param arxiv: The arxiv of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._arxiv = arxiv - - @property - def jstor(self): - """Gets the jstor of this ReleaseExtIds. # noqa: E501 - - JSTOR work identifier # noqa: E501 - - :return: The jstor of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._jstor - - @jstor.setter - def jstor(self, jstor): - """Sets the jstor of this ReleaseExtIds. - - JSTOR work identifier # noqa: E501 - - :param jstor: The jstor of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._jstor = jstor - - @property - def ark(self): - """Gets the ark of this ReleaseExtIds. # noqa: E501 - - ARK identifier # noqa: E501 - - :return: The ark of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._ark - - @ark.setter - def ark(self, ark): - """Sets the ark of this ReleaseExtIds. - - ARK identifier # noqa: E501 - - :param ark: The ark of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._ark = ark - - @property - def mag(self): - """Gets the mag of this ReleaseExtIds. # noqa: E501 - - Microsoft Academic Graph identifier # noqa: E501 - - :return: The mag of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._mag - - @mag.setter - def mag(self, mag): - """Sets the mag of this ReleaseExtIds. - - Microsoft Academic Graph identifier # noqa: E501 - - :param mag: The mag of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._mag = mag - - @property - def doaj(self): - """Gets the doaj of this ReleaseExtIds. # noqa: E501 - - DOAJ article-level identifier # noqa: E501 - - :return: The doaj of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._doaj - - @doaj.setter - def doaj(self, doaj): - """Sets the doaj of this ReleaseExtIds. - - DOAJ article-level identifier # noqa: E501 - - :param doaj: The doaj of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._doaj = doaj - - @property - def dblp(self): - """Gets the dblp of this ReleaseExtIds. # noqa: E501 - - dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings # noqa: E501 - - :return: The dblp of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._dblp - - @dblp.setter - def dblp(self, dblp): - """Sets the dblp of this ReleaseExtIds. - - dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings # noqa: E501 - - :param dblp: The dblp of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._dblp = dblp - - @property - def oai(self): - """Gets the oai of this ReleaseExtIds. # noqa: E501 - - OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs) # noqa: E501 - - :return: The oai of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._oai - - @oai.setter - def oai(self, oai): - """Sets the oai of this ReleaseExtIds. - - OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs) # noqa: E501 - - :param oai: The oai of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._oai = oai - - @property - def hdl(self): - """Gets the hdl of this ReleaseExtIds. # noqa: E501 - - Handle identifier. Do not put DOIs in this field # noqa: E501 - - :return: The hdl of this ReleaseExtIds. # noqa: E501 - :rtype: str - """ - return self._hdl - - @hdl.setter - def hdl(self, hdl): - """Sets the hdl of this ReleaseExtIds. - - Handle identifier. Do not put DOIs in this field # noqa: E501 - - :param hdl: The hdl of this ReleaseExtIds. # noqa: E501 - :type: str - """ - - self._hdl = hdl - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseExtIds): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/release_ref.py b/python_openapi_client/fatcat_openapi_client/models/release_ref.py deleted file mode 100644 index 1fd5288d..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/release_ref.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class ReleaseRef(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'index': 'int', - 'target_release_id': 'str', - 'extra': 'dict(str, object)', - 'key': 'str', - 'year': 'int', - 'container_name': 'str', - 'title': 'str', - 'locator': 'str' - } - - attribute_map = { - 'index': 'index', - 'target_release_id': 'target_release_id', - 'extra': 'extra', - 'key': 'key', - 'year': 'year', - 'container_name': 'container_name', - 'title': 'title', - 'locator': 'locator' - } - - def __init__(self, index=None, target_release_id=None, extra=None, key=None, year=None, container_name=None, title=None, locator=None): # noqa: E501 - """ReleaseRef - a model defined in OpenAPI""" # noqa: E501 - - self._index = None - self._target_release_id = None - self._extra = None - self._key = None - self._year = None - self._container_name = None - self._title = None - self._locator = None - self.discriminator = None - - if index is not None: - self.index = index - if target_release_id is not None: - self.target_release_id = target_release_id - if extra is not None: - self.extra = extra - if key is not None: - self.key = key - if year is not None: - self.year = year - if container_name is not None: - self.container_name = container_name - if title is not None: - self.title = title - if locator is not None: - self.locator = locator - - @property - def index(self): - """Gets the index of this ReleaseRef. # noqa: E501 - - Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. # noqa: E501 - - :return: The index of this ReleaseRef. # noqa: E501 - :rtype: int - """ - return self._index - - @index.setter - def index(self, index): - """Sets the index of this ReleaseRef. - - Zero-indexed sequence number of this reference in the list of references. Assigned automatically and used internally; don't confuse with `key`. # noqa: E501 - - :param index: The index of this ReleaseRef. # noqa: E501 - :type: int - """ - - self._index = index - - @property - def target_release_id(self): - """Gets the target_release_id of this ReleaseRef. # noqa: E501 - - Optional, fatcat identifier of release entity that this reference is citing. # noqa: E501 - - :return: The target_release_id of this ReleaseRef. # noqa: E501 - :rtype: str - """ - return self._target_release_id - - @target_release_id.setter - def target_release_id(self, target_release_id): - """Sets the target_release_id of this ReleaseRef. - - Optional, fatcat identifier of release entity that this reference is citing. # noqa: E501 - - :param target_release_id: The target_release_id of this ReleaseRef. # noqa: E501 - :type: str - """ - if target_release_id is not None and len(target_release_id) > 26: - raise ValueError("Invalid value for `target_release_id`, length must be less than or equal to `26`") # noqa: E501 - if target_release_id is not None and len(target_release_id) < 26: - raise ValueError("Invalid value for `target_release_id`, length must be greater than or equal to `26`") # noqa: E501 - if target_release_id is not None and not re.search(r'[a-zA-Z2-7]{26}', target_release_id): # noqa: E501 - raise ValueError(r"Invalid value for `target_release_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._target_release_id = target_release_id - - @property - def extra(self): - """Gets the extra of this ReleaseRef. # noqa: E501 - - Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. # noqa: E501 - - :return: The extra of this ReleaseRef. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this ReleaseRef. - - Additional free-form JSON metadata about this citation. Generally follows Citation Style Language (CSL) JSON schema. See guide for details. # noqa: E501 - - :param extra: The extra of this ReleaseRef. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def key(self): - """Gets the key of this ReleaseRef. # noqa: E501 - - Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. # noqa: E501 - - :return: The key of this ReleaseRef. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this ReleaseRef. - - Short string used to indicate this reference from within the release text; or numbering of references as typeset in the release itself. Optional; don't confuse with `index` field. # noqa: E501 - - :param key: The key of this ReleaseRef. # noqa: E501 - :type: str - """ - - self._key = key - - @property - def year(self): - """Gets the year of this ReleaseRef. # noqa: E501 - - Year that the cited work was published in. # noqa: E501 - - :return: The year of this ReleaseRef. # noqa: E501 - :rtype: int - """ - return self._year - - @year.setter - def year(self, year): - """Sets the year of this ReleaseRef. - - Year that the cited work was published in. # noqa: E501 - - :param year: The year of this ReleaseRef. # noqa: E501 - :type: int - """ - - self._year = year - - @property - def container_name(self): - """Gets the container_name of this ReleaseRef. # noqa: E501 - - Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. # noqa: E501 - - :return: The container_name of this ReleaseRef. # noqa: E501 - :rtype: str - """ - return self._container_name - - @container_name.setter - def container_name(self, container_name): - """Sets the container_name of this ReleaseRef. - - Name of the container (eg, journal) that the citation work was published as part of. May be an acronym or full name. # noqa: E501 - - :param container_name: The container_name of this ReleaseRef. # noqa: E501 - :type: str - """ - - self._container_name = container_name - - @property - def title(self): - """Gets the title of this ReleaseRef. # noqa: E501 - - Name of the work being cited. # noqa: E501 - - :return: The title of this ReleaseRef. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this ReleaseRef. - - Name of the work being cited. # noqa: E501 - - :param title: The title of this ReleaseRef. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def locator(self): - """Gets the locator of this ReleaseRef. # noqa: E501 - - Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. # noqa: E501 - - :return: The locator of this ReleaseRef. # noqa: E501 - :rtype: str - """ - return self._locator - - @locator.setter - def locator(self, locator): - """Sets the locator of this ReleaseRef. - - Page number or other indicator of the specific subset of a work being cited. Not to be confused with the first page (or page range) of an entire paper or chapter being cited. # noqa: E501 - - :param locator: The locator of this ReleaseRef. # noqa: E501 - :type: str - """ - - self._locator = locator - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReleaseRef): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/success.py b/python_openapi_client/fatcat_openapi_client/models/success.py deleted file mode 100644 index 7313d652..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/success.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class Success(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'success': 'bool', - 'message': 'str' - } - - attribute_map = { - 'success': 'success', - 'message': 'message' - } - - def __init__(self, success=None, message=None): # noqa: E501 - """Success - a model defined in OpenAPI""" # noqa: E501 - - self._success = None - self._message = None - self.discriminator = None - - self.success = success - self.message = message - - @property - def success(self): - """Gets the success of this Success. # noqa: E501 - - - :return: The success of this Success. # noqa: E501 - :rtype: bool - """ - return self._success - - @success.setter - def success(self, success): - """Sets the success of this Success. - - - :param success: The success of this Success. # noqa: E501 - :type: bool - """ - if success is None: - raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 - - self._success = success - - @property - def message(self): - """Gets the message of this Success. # noqa: E501 - - - :return: The message of this Success. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this Success. - - - :param message: The message of this Success. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Success): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py deleted file mode 100644 index 1a021d9b..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WebcaptureAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[WebcaptureEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """WebcaptureAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this WebcaptureAutoBatch. # noqa: E501 - - - :return: The editgroup of this WebcaptureAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this WebcaptureAutoBatch. - - - :param editgroup: The editgroup of this WebcaptureAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this WebcaptureAutoBatch. # noqa: E501 - - - :return: The entity_list of this WebcaptureAutoBatch. # noqa: E501 - :rtype: list[WebcaptureEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this WebcaptureAutoBatch. - - - :param entity_list: The entity_list of this WebcaptureAutoBatch. # noqa: E501 - :type: list[WebcaptureEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebcaptureAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py deleted file mode 100644 index 7787c0c4..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_cdx_line.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WebcaptureCdxLine(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'surt': 'str', - 'timestamp': 'datetime', - 'url': 'str', - 'mimetype': 'str', - 'status_code': 'int', - 'size': 'int', - 'sha1': 'str', - 'sha256': 'str' - } - - attribute_map = { - 'surt': 'surt', - 'timestamp': 'timestamp', - 'url': 'url', - 'mimetype': 'mimetype', - 'status_code': 'status_code', - 'size': 'size', - 'sha1': 'sha1', - 'sha256': 'sha256' - } - - def __init__(self, surt=None, timestamp=None, url=None, mimetype=None, status_code=None, size=None, sha1=None, sha256=None): # noqa: E501 - """WebcaptureCdxLine - a model defined in OpenAPI""" # noqa: E501 - - self._surt = None - self._timestamp = None - self._url = None - self._mimetype = None - self._status_code = None - self._size = None - self._sha1 = None - self._sha256 = None - self.discriminator = None - - self.surt = surt - self.timestamp = timestamp - self.url = url - if mimetype is not None: - self.mimetype = mimetype - if status_code is not None: - self.status_code = status_code - if size is not None: - self.size = size - self.sha1 = sha1 - if sha256 is not None: - self.sha256 = sha256 - - @property - def surt(self): - """Gets the surt of this WebcaptureCdxLine. # noqa: E501 - - \"Sortable URL\" format. See guide for details. # noqa: E501 - - :return: The surt of this WebcaptureCdxLine. # noqa: E501 - :rtype: str - """ - return self._surt - - @surt.setter - def surt(self, surt): - """Sets the surt of this WebcaptureCdxLine. - - \"Sortable URL\" format. See guide for details. # noqa: E501 - - :param surt: The surt of this WebcaptureCdxLine. # noqa: E501 - :type: str - """ - if surt is None: - raise ValueError("Invalid value for `surt`, must not be `None`") # noqa: E501 - - self._surt = surt - - @property - def timestamp(self): - """Gets the timestamp of this WebcaptureCdxLine. # noqa: E501 - - Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision. # noqa: E501 - - :return: The timestamp of this WebcaptureCdxLine. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this WebcaptureCdxLine. - - Date and time of capture, in ISO format. UTC, 'Z'-terminated, second (or better) precision. # noqa: E501 - - :param timestamp: The timestamp of this WebcaptureCdxLine. # noqa: E501 - :type: datetime - """ - if timestamp is None: - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - - self._timestamp = timestamp - - @property - def url(self): - """Gets the url of this WebcaptureCdxLine. # noqa: E501 - - Full URL/URI of resource captured. # noqa: E501 - - :return: The url of this WebcaptureCdxLine. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this WebcaptureCdxLine. - - Full URL/URI of resource captured. # noqa: E501 - - :param url: The url of this WebcaptureCdxLine. # noqa: E501 - :type: str - """ - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def mimetype(self): - """Gets the mimetype of this WebcaptureCdxLine. # noqa: E501 - - Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. # noqa: E501 - - :return: The mimetype of this WebcaptureCdxLine. # noqa: E501 - :rtype: str - """ - return self._mimetype - - @mimetype.setter - def mimetype(self, mimetype): - """Sets the mimetype of this WebcaptureCdxLine. - - Mimetype of the resource at this URL. May be the Content-Type header, or the actually sniffed file type. # noqa: E501 - - :param mimetype: The mimetype of this WebcaptureCdxLine. # noqa: E501 - :type: str - """ - - self._mimetype = mimetype - - @property - def status_code(self): - """Gets the status_code of this WebcaptureCdxLine. # noqa: E501 - - HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. # noqa: E501 - - :return: The status_code of this WebcaptureCdxLine. # noqa: E501 - :rtype: int - """ - return self._status_code - - @status_code.setter - def status_code(self, status_code): - """Sets the status_code of this WebcaptureCdxLine. - - HTTP status code. Should generally be 200, especially for the primary resource, but may be 3xx (redirect) or even error codes if embedded resources can not be fetched successfully. # noqa: E501 - - :param status_code: The status_code of this WebcaptureCdxLine. # noqa: E501 - :type: int - """ - - self._status_code = status_code - - @property - def size(self): - """Gets the size of this WebcaptureCdxLine. # noqa: E501 - - Resource (file) size in bytes # noqa: E501 - - :return: The size of this WebcaptureCdxLine. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this WebcaptureCdxLine. - - Resource (file) size in bytes # noqa: E501 - - :param size: The size of this WebcaptureCdxLine. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def sha1(self): - """Gets the sha1 of this WebcaptureCdxLine. # noqa: E501 - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :return: The sha1 of this WebcaptureCdxLine. # noqa: E501 - :rtype: str - """ - return self._sha1 - - @sha1.setter - def sha1(self, sha1): - """Sets the sha1 of this WebcaptureCdxLine. - - SHA-1 hash of data, in hex encoding # noqa: E501 - - :param sha1: The sha1 of this WebcaptureCdxLine. # noqa: E501 - :type: str - """ - if sha1 is None: - raise ValueError("Invalid value for `sha1`, must not be `None`") # noqa: E501 - if sha1 is not None and len(sha1) > 40: - raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501 - if sha1 is not None and len(sha1) < 40: - raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501 - if sha1 is not None and not re.search(r'[a-f0-9]{40}', sha1): # noqa: E501 - raise ValueError(r"Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 - - self._sha1 = sha1 - - @property - def sha256(self): - """Gets the sha256 of this WebcaptureCdxLine. # noqa: E501 - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :return: The sha256 of this WebcaptureCdxLine. # noqa: E501 - :rtype: str - """ - return self._sha256 - - @sha256.setter - def sha256(self, sha256): - """Sets the sha256 of this WebcaptureCdxLine. - - SHA-256 hash of data, in hex encoding # noqa: E501 - - :param sha256: The sha256 of this WebcaptureCdxLine. # noqa: E501 - :type: str - """ - if sha256 is not None and len(sha256) > 64: - raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501 - if sha256 is not None and len(sha256) < 64: - raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501 - if sha256 is not None and not re.search(r'[a-f0-9]{64}', sha256): # noqa: E501 - raise ValueError(r"Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 - - self._sha256 = sha256 - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebcaptureCdxLine): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py deleted file mode 100644 index 968b0b1c..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.5.0 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WebcaptureEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)', - 'cdx': 'list[WebcaptureCdxLine]', - 'archive_urls': 'list[WebcaptureUrl]', - 'original_url': 'str', - 'timestamp': 'datetime', - 'content_scope': 'str', - 'release_ids': 'list[str]', - 'releases': 'list[ReleaseEntity]' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra', - 'cdx': 'cdx', - 'archive_urls': 'archive_urls', - 'original_url': 'original_url', - 'timestamp': 'timestamp', - 'content_scope': 'content_scope', - 'release_ids': 'release_ids', - 'releases': 'releases' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None, cdx=None, archive_urls=None, original_url=None, timestamp=None, content_scope=None, release_ids=None, releases=None): # noqa: E501 - """WebcaptureEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self._cdx = None - self._archive_urls = None - self._original_url = None - self._timestamp = None - self._content_scope = None - self._release_ids = None - self._releases = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - if cdx is not None: - self.cdx = cdx - if archive_urls is not None: - self.archive_urls = archive_urls - if original_url is not None: - self.original_url = original_url - if timestamp is not None: - self.timestamp = timestamp - if content_scope is not None: - self.content_scope = content_scope - if release_ids is not None: - self.release_ids = release_ids - if releases is not None: - self.releases = releases - - @property - def state(self): - """Gets the state of this WebcaptureEntity. # noqa: E501 - - - :return: The state of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this WebcaptureEntity. - - - :param state: The state of this WebcaptureEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this WebcaptureEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this WebcaptureEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this WebcaptureEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this WebcaptureEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this WebcaptureEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this WebcaptureEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this WebcaptureEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this WebcaptureEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this WebcaptureEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this WebcaptureEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this WebcaptureEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this WebcaptureEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this WebcaptureEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this WebcaptureEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this WebcaptureEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this WebcaptureEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this WebcaptureEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - @property - def cdx(self): - """Gets the cdx of this WebcaptureEntity. # noqa: E501 - - - :return: The cdx of this WebcaptureEntity. # noqa: E501 - :rtype: list[WebcaptureCdxLine] - """ - return self._cdx - - @cdx.setter - def cdx(self, cdx): - """Sets the cdx of this WebcaptureEntity. - - - :param cdx: The cdx of this WebcaptureEntity. # noqa: E501 - :type: list[WebcaptureCdxLine] - """ - - self._cdx = cdx - - @property - def archive_urls(self): - """Gets the archive_urls of this WebcaptureEntity. # noqa: E501 - - - :return: The archive_urls of this WebcaptureEntity. # noqa: E501 - :rtype: list[WebcaptureUrl] - """ - return self._archive_urls - - @archive_urls.setter - def archive_urls(self, archive_urls): - """Sets the archive_urls of this WebcaptureEntity. - - - :param archive_urls: The archive_urls of this WebcaptureEntity. # noqa: E501 - :type: list[WebcaptureUrl] - """ - - self._archive_urls = archive_urls - - @property - def original_url(self): - """Gets the original_url of this WebcaptureEntity. # noqa: E501 - - Base URL of the primary resource this is a capture of # noqa: E501 - - :return: The original_url of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._original_url - - @original_url.setter - def original_url(self, original_url): - """Sets the original_url of this WebcaptureEntity. - - Base URL of the primary resource this is a capture of # noqa: E501 - - :param original_url: The original_url of this WebcaptureEntity. # noqa: E501 - :type: str - """ - - self._original_url = original_url - - @property - def timestamp(self): - """Gets the timestamp of this WebcaptureEntity. # noqa: E501 - - Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. # noqa: E501 - - :return: The timestamp of this WebcaptureEntity. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this WebcaptureEntity. - - Same format as CDX line timestamp (UTC, etc). Corresponds to the overall capture timestamp. Should generally be the timestamp of capture of the primary resource URL. # noqa: E501 - - :param timestamp: The timestamp of this WebcaptureEntity. # noqa: E501 - :type: datetime - """ - - self._timestamp = timestamp - - @property - def content_scope(self): - """Gets the content_scope of this WebcaptureEntity. # noqa: E501 - - - :return: The content_scope of this WebcaptureEntity. # noqa: E501 - :rtype: str - """ - return self._content_scope - - @content_scope.setter - def content_scope(self, content_scope): - """Sets the content_scope of this WebcaptureEntity. - - - :param content_scope: The content_scope of this WebcaptureEntity. # noqa: E501 - :type: str - """ - - self._content_scope = content_scope - - @property - def release_ids(self): - """Gets the release_ids of this WebcaptureEntity. # noqa: E501 - - Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501 - - :return: The release_ids of this WebcaptureEntity. # noqa: E501 - :rtype: list[str] - """ - return self._release_ids - - @release_ids.setter - def release_ids(self, release_ids): - """Sets the release_ids of this WebcaptureEntity. - - Set of identifier of release entities this fileset represents a full manifestation of. Usually a single release. # noqa: E501 - - :param release_ids: The release_ids of this WebcaptureEntity. # noqa: E501 - :type: list[str] - """ - - self._release_ids = release_ids - - @property - def releases(self): - """Gets the releases of this WebcaptureEntity. # noqa: E501 - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :return: The releases of this WebcaptureEntity. # noqa: E501 - :rtype: list[ReleaseEntity] - """ - return self._releases - - @releases.setter - def releases(self, releases): - """Sets the releases of this WebcaptureEntity. - - Full release entities, included in GET responses when `releases` included in `expand` parameter. Ignored if included in PUT or POST requests. # noqa: E501 - - :param releases: The releases of this WebcaptureEntity. # noqa: E501 - :type: list[ReleaseEntity] - """ - - self._releases = releases - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebcaptureEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py deleted file mode 100644 index f9740c61..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_url.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WebcaptureUrl(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'url': 'str', - 'rel': 'str' - } - - attribute_map = { - 'url': 'url', - 'rel': 'rel' - } - - def __init__(self, url=None, rel=None): # noqa: E501 - """WebcaptureUrl - a model defined in OpenAPI""" # noqa: E501 - - self._url = None - self._rel = None - self.discriminator = None - - self.url = url - self.rel = rel - - @property - def url(self): - """Gets the url of this WebcaptureUrl. # noqa: E501 - - URL/URI pointing to archive of this web resource. # noqa: E501 - - :return: The url of this WebcaptureUrl. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this WebcaptureUrl. - - URL/URI pointing to archive of this web resource. # noqa: E501 - - :param url: The url of this WebcaptureUrl. # noqa: E501 - :type: str - """ - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def rel(self): - """Gets the rel of this WebcaptureUrl. # noqa: E501 - - Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list. # noqa: E501 - - :return: The rel of this WebcaptureUrl. # noqa: E501 - :rtype: str - """ - return self._rel - - @rel.setter - def rel(self, rel): - """Sets the rel of this WebcaptureUrl. - - Type of archive endpoint. Usually `wayback` (WBM replay of primary resource), or `warc` (direct URL to a WARC file containing all resources of the capture). See guide for full list. # noqa: E501 - - :param rel: The rel of this WebcaptureUrl. # noqa: E501 - :type: str - """ - if rel is None: - raise ValueError("Invalid value for `rel`, must not be `None`") # noqa: E501 - - self._rel = rel - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebcaptureUrl): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py b/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py deleted file mode 100644 index b403c850..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/work_auto_batch.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WorkAutoBatch(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'editgroup': 'Editgroup', - 'entity_list': 'list[WorkEntity]' - } - - attribute_map = { - 'editgroup': 'editgroup', - 'entity_list': 'entity_list' - } - - def __init__(self, editgroup=None, entity_list=None): # noqa: E501 - """WorkAutoBatch - a model defined in OpenAPI""" # noqa: E501 - - self._editgroup = None - self._entity_list = None - self.discriminator = None - - self.editgroup = editgroup - self.entity_list = entity_list - - @property - def editgroup(self): - """Gets the editgroup of this WorkAutoBatch. # noqa: E501 - - - :return: The editgroup of this WorkAutoBatch. # noqa: E501 - :rtype: Editgroup - """ - return self._editgroup - - @editgroup.setter - def editgroup(self, editgroup): - """Sets the editgroup of this WorkAutoBatch. - - - :param editgroup: The editgroup of this WorkAutoBatch. # noqa: E501 - :type: Editgroup - """ - if editgroup is None: - raise ValueError("Invalid value for `editgroup`, must not be `None`") # noqa: E501 - - self._editgroup = editgroup - - @property - def entity_list(self): - """Gets the entity_list of this WorkAutoBatch. # noqa: E501 - - - :return: The entity_list of this WorkAutoBatch. # noqa: E501 - :rtype: list[WorkEntity] - """ - return self._entity_list - - @entity_list.setter - def entity_list(self, entity_list): - """Sets the entity_list of this WorkAutoBatch. - - - :param entity_list: The entity_list of this WorkAutoBatch. # noqa: E501 - :type: list[WorkEntity] - """ - if entity_list is None: - raise ValueError("Invalid value for `entity_list`, must not be `None`") # noqa: E501 - - self._entity_list = entity_list - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WorkAutoBatch): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python_openapi_client/fatcat_openapi_client/models/work_entity.py b/python_openapi_client/fatcat_openapi_client/models/work_entity.py deleted file mode 100644 index 25f81e96..00000000 --- a/python_openapi_client/fatcat_openapi_client/models/work_entity.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding: utf-8 - -""" - fatcat - - Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - - The version of the OpenAPI document: 0.3.1 - Contact: webservices@archive.org - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class WorkEntity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'ident': 'str', - 'revision': 'str', - 'redirect': 'str', - 'extra': 'dict(str, object)', - 'edit_extra': 'dict(str, object)' - } - - attribute_map = { - 'state': 'state', - 'ident': 'ident', - 'revision': 'revision', - 'redirect': 'redirect', - 'extra': 'extra', - 'edit_extra': 'edit_extra' - } - - def __init__(self, state=None, ident=None, revision=None, redirect=None, extra=None, edit_extra=None): # noqa: E501 - """WorkEntity - a model defined in OpenAPI""" # noqa: E501 - - self._state = None - self._ident = None - self._revision = None - self._redirect = None - self._extra = None - self._edit_extra = None - self.discriminator = None - - if state is not None: - self.state = state - if ident is not None: - self.ident = ident - if revision is not None: - self.revision = revision - if redirect is not None: - self.redirect = redirect - if extra is not None: - self.extra = extra - if edit_extra is not None: - self.edit_extra = edit_extra - - @property - def state(self): - """Gets the state of this WorkEntity. # noqa: E501 - - - :return: The state of this WorkEntity. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this WorkEntity. - - - :param state: The state of this WorkEntity. # noqa: E501 - :type: str - """ - allowed_values = ["wip", "active", "redirect", "deleted"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def ident(self): - """Gets the ident of this WorkEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The ident of this WorkEntity. # noqa: E501 - :rtype: str - """ - return self._ident - - @ident.setter - def ident(self, ident): - """Sets the ident of this WorkEntity. - - base32-encoded unique identifier # noqa: E501 - - :param ident: The ident of this WorkEntity. # noqa: E501 - :type: str - """ - if ident is not None and len(ident) > 26: - raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 - if ident is not None and len(ident) < 26: - raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._ident = ident - - @property - def revision(self): - """Gets the revision of this WorkEntity. # noqa: E501 - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :return: The revision of this WorkEntity. # noqa: E501 - :rtype: str - """ - return self._revision - - @revision.setter - def revision(self, revision): - """Sets the revision of this WorkEntity. - - UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 - - :param revision: The revision of this WorkEntity. # noqa: E501 - :type: str - """ - if revision is not None and len(revision) > 36: - raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 - if revision is not None and len(revision) < 36: - raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 - - self._revision = revision - - @property - def redirect(self): - """Gets the redirect of this WorkEntity. # noqa: E501 - - base32-encoded unique identifier # noqa: E501 - - :return: The redirect of this WorkEntity. # noqa: E501 - :rtype: str - """ - return self._redirect - - @redirect.setter - def redirect(self, redirect): - """Sets the redirect of this WorkEntity. - - base32-encoded unique identifier # noqa: E501 - - :param redirect: The redirect of this WorkEntity. # noqa: E501 - :type: str - """ - if redirect is not None and len(redirect) > 26: - raise ValueError("Invalid value for `redirect`, length must be less than or equal to `26`") # noqa: E501 - if redirect is not None and len(redirect) < 26: - raise ValueError("Invalid value for `redirect`, length must be greater than or equal to `26`") # noqa: E501 - if redirect is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect): # noqa: E501 - raise ValueError(r"Invalid value for `redirect`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 - - self._redirect = redirect - - @property - def extra(self): - """Gets the extra of this WorkEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :return: The extra of this WorkEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._extra - - @extra.setter - def extra(self, extra): - """Sets the extra of this WorkEntity. - - Free-form JSON metadata that will be stored with the other entity metadata. See guide for (unenforced) schema conventions. # noqa: E501 - - :param extra: The extra of this WorkEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._extra = extra - - @property - def edit_extra(self): - """Gets the edit_extra of this WorkEntity. # noqa: E501 - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :return: The edit_extra of this WorkEntity. # noqa: E501 - :rtype: dict(str, object) - """ - return self._edit_extra - - @edit_extra.setter - def edit_extra(self, edit_extra): - """Sets the edit_extra of this WorkEntity. - - Free-form JSON metadata that will be stored with specific entity edits (eg, creation/update/delete). # noqa: E501 - - :param edit_extra: The edit_extra of this WorkEntity. # noqa: E501 - :type: dict(str, object) - """ - - self._edit_extra = edit_extra - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WorkEntity): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other |