diff options
Diffstat (limited to 'python/fatcat_client')
-rw-r--r-- | python/fatcat_client/api/default_api.py | 276 | ||||
-rw-r--r-- | python/fatcat_client/models/editor.py | 8 | ||||
-rw-r--r-- | python/fatcat_client/models/entity_edit.py | 54 | ||||
-rw-r--r-- | python/fatcat_client/models/file_entity.py | 18 | ||||
-rw-r--r-- | python/fatcat_client/models/fileset_entity_manifest.py | 18 | ||||
-rw-r--r-- | python/fatcat_client/models/release_entity_abstracts.py | 6 | ||||
-rw-r--r-- | python/fatcat_client/models/release_ref.py | 8 | ||||
-rw-r--r-- | python/fatcat_client/models/webcapture_entity_cdx.py | 23 |
8 files changed, 360 insertions, 51 deletions
diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py index 3865ff96..9f7edf07 100644 --- a/python/fatcat_client/api/default_api.py +++ b/python/fatcat_client/api/default_api.py @@ -1787,7 +1787,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -1808,7 +1808,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -1834,6 +1834,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_container_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_container_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -1985,7 +1993,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2006,7 +2014,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2032,6 +2040,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_creator_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_creator_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2183,7 +2199,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2204,7 +2220,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2230,6 +2246,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_file_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_file_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2381,7 +2405,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2402,7 +2426,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2428,6 +2452,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_fileset_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_fileset_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2579,7 +2611,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2600,7 +2632,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2626,6 +2658,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_release_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_release_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2777,7 +2817,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2798,7 +2838,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2824,6 +2864,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_webcapture_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_webcapture_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -2975,7 +3023,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -2996,7 +3044,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: Success If the method is called asynchronously, returns the request thread. @@ -3022,6 +3070,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `delete_work_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `delete_work_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -3367,7 +3423,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -3388,7 +3444,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -3414,6 +3470,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_container_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_container_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -3662,7 +3726,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For containers, none accepted (yet). :param str hide: List of entity fields to elide in response. For containers, none accepted (yet). :return: ContainerEntity @@ -3685,7 +3749,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For containers, none accepted (yet). :param str hide: List of entity fields to elide in response. For containers, none accepted (yet). :return: ContainerEntity @@ -3713,6 +3777,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_container_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_container_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -3872,7 +3944,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -3893,7 +3965,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -3919,6 +3991,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_creator_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_creator_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -4268,7 +4348,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For creators, none accepted (yet). :param str hide: List of entity fields to elide in response. For creators, none accepted (yet). :return: CreatorEntity @@ -4291,7 +4371,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For creators, none accepted (yet). :param str hide: List of entity fields to elide in response. For creators, none accepted (yet). :return: CreatorEntity @@ -4319,6 +4399,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_creator_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_creator_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -4777,7 +4865,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -4798,7 +4886,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -4824,6 +4912,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_file_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_file_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -5072,7 +5168,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For files, none accepted (yet). :param str hide: List of entity fields to elide in response. For files, none accepted (yet). :return: FileEntity @@ -5095,7 +5191,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For files, none accepted (yet). :param str hide: List of entity fields to elide in response. For files, none accepted (yet). :return: FileEntity @@ -5123,6 +5219,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_file_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_file_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -5282,7 +5386,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -5303,7 +5407,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -5329,6 +5433,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_fileset_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_fileset_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -5577,7 +5689,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For filesets, none accepted (yet). :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted. :return: FilesetEntity @@ -5600,7 +5712,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For filesets, none accepted (yet). :param str hide: List of entity fields to elide in response. For filesets, 'manifest' is accepted. :return: FilesetEntity @@ -5628,6 +5740,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_fileset_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_fileset_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -5787,7 +5907,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -5808,7 +5928,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -5834,6 +5954,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_release_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_release_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -6284,7 +6412,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For releases, none accepted (yet). :param str hide: List of entity fields to elide in response. For releases, none accepted (yet). :return: ReleaseEntity @@ -6307,7 +6435,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For releases, none accepted (yet). :param str hide: List of entity fields to elide in response. For releases, none accepted (yet). :return: ReleaseEntity @@ -6335,6 +6463,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_release_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_release_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -6595,7 +6731,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -6616,7 +6752,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -6642,6 +6778,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_webcapture_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_webcapture_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -6890,7 +7034,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For webcaptures, none accepted (yet). :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted. :return: WebcaptureEntity @@ -6913,7 +7057,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For webcaptures, none accepted (yet). :param str hide: List of entity fields to elide in response. For webcaptures, 'cdx' is accepted. :return: WebcaptureEntity @@ -6941,6 +7085,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_webcapture_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_webcapture_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -7100,7 +7252,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -7121,7 +7273,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param int edit_id: (required) + :param str edit_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :return: EntityEdit If the method is called asynchronously, returns the request thread. @@ -7147,6 +7299,14 @@ class DefaultApi(object): params['edit_id'] is None): raise ValueError("Missing the required parameter `edit_id` when calling `get_work_edit`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) > 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, length must be less than or equal to `36`") # noqa: E501 + if ('edit_id' in params and + len(params['edit_id']) < 36): + raise ValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, length must be greater than or equal to `36`") # noqa: E501 + if 'edit_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['edit_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `edit_id` when calling `get_work_edit`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -7496,7 +7656,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For works, none accepted (yet). :param str hide: List of entity fields to elide in response. For works, none accepted (yet). :return: WorkEntity @@ -7519,7 +7679,7 @@ class DefaultApi(object): >>> result = thread.get() :param async bool - :param str rev_id: (required) + :param str rev_id: UUID (lower-case, dash-separated, hex-encoded 128-bit) (required) :param str expand: List of sub-entities to expand in response. For works, none accepted (yet). :param str hide: List of entity fields to elide in response. For works, none accepted (yet). :return: WorkEntity @@ -7547,6 +7707,14 @@ class DefaultApi(object): params['rev_id'] is None): raise ValueError("Missing the required parameter `rev_id` when calling `get_work_revision`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) > 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, length must be less than or equal to `36`") # noqa: E501 + if ('rev_id' in params and + len(params['rev_id']) < 36): + raise ValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, length must be greater than or equal to `36`") # noqa: E501 + if 'rev_id' in params and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', params['rev_id']): # noqa: E501 + raise ValueError("Invalid value for parameter `rev_id` when calling `get_work_revision`, must conform to the pattern `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 collection_formats = {} path_params = {} @@ -7878,6 +8046,30 @@ class DefaultApi(object): params[key] = val del params['kwargs'] + if ('md5' in params and + len(params['md5']) > 32): + raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be less than or equal to `32`") # noqa: E501 + if ('md5' in params and + len(params['md5']) < 32): + raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, length must be greater than or equal to `32`") # noqa: E501 + if 'md5' in params and not re.search('[a-f0-9]{32}', params['md5']): # noqa: E501 + raise ValueError("Invalid value for parameter `md5` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{32}/`") # noqa: E501 + if ('sha1' in params and + len(params['sha1']) > 40): + raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be less than or equal to `40`") # noqa: E501 + if ('sha1' in params and + len(params['sha1']) < 40): + raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, length must be greater than or equal to `40`") # noqa: E501 + if 'sha1' in params and not re.search('[a-f0-9]{40}', params['sha1']): # noqa: E501 + raise ValueError("Invalid value for parameter `sha1` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{40}/`") # noqa: E501 + if ('sha256' in params and + len(params['sha256']) > 64): + raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be less than or equal to `64`") # noqa: E501 + if ('sha256' in params and + len(params['sha256']) < 64): + raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, length must be greater than or equal to `64`") # noqa: E501 + if 'sha256' in params and not re.search('[a-f0-9]{64}', params['sha256']): # noqa: E501 + raise ValueError("Invalid value for parameter `sha256` when calling `lookup_file`, must conform to the pattern `/[a-f0-9]{64}/`") # noqa: E501 collection_formats = {} path_params = {} diff --git a/python/fatcat_client/models/editor.py b/python/fatcat_client/models/editor.py index c926f86f..2010d454 100644 --- a/python/fatcat_client/models/editor.py +++ b/python/fatcat_client/models/editor.py @@ -55,6 +55,7 @@ class Editor(object): def editor_id(self): """Gets the editor_id of this Editor. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editor_id of this Editor. # noqa: E501 :rtype: str @@ -65,10 +66,17 @@ class Editor(object): def editor_id(self, editor_id): """Sets the editor_id of this Editor. + base32-encoded unique identifier # 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('[a-zA-Z2-7]{26}', editor_id): # noqa: E501 + raise ValueError("Invalid value for `editor_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._editor_id = editor_id diff --git a/python/fatcat_client/models/entity_edit.py b/python/fatcat_client/models/entity_edit.py index 27af5eb6..cb1da67b 100644 --- a/python/fatcat_client/models/entity_edit.py +++ b/python/fatcat_client/models/entity_edit.py @@ -31,7 +31,7 @@ class EntityEdit(object): and the value is json key in definition. """ swagger_types = { - 'edit_id': 'int', + 'edit_id': 'str', 'ident': 'str', 'revision': 'str', 'prev_revision': 'str', @@ -78,9 +78,10 @@ class EntityEdit(object): def edit_id(self): """Gets the edit_id of this EntityEdit. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The edit_id of this EntityEdit. # noqa: E501 - :rtype: int + :rtype: str """ return self._edit_id @@ -88,12 +89,19 @@ class EntityEdit(object): def edit_id(self, edit_id): """Sets the edit_id of this EntityEdit. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :param edit_id: The edit_id of this EntityEdit. # noqa: E501 - :type: int + :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('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501 + raise ValueError("Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._edit_id = edit_id @@ -101,6 +109,7 @@ class EntityEdit(object): def ident(self): """Gets the ident of this EntityEdit. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The ident of this EntityEdit. # noqa: E501 :rtype: str @@ -111,12 +120,19 @@ class EntityEdit(object): def ident(self, ident): """Sets the ident of this EntityEdit. + base32-encoded unique identifier # 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('[a-zA-Z2-7]{26}', ident): # noqa: E501 + raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._ident = ident @@ -124,6 +140,7 @@ class EntityEdit(object): def revision(self): """Gets the revision of this EntityEdit. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The revision of this EntityEdit. # noqa: E501 :rtype: str @@ -134,10 +151,17 @@ class EntityEdit(object): def revision(self, revision): """Sets the revision of this EntityEdit. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # 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('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 + raise ValueError("Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._revision = revision @@ -145,6 +169,7 @@ class EntityEdit(object): def prev_revision(self): """Gets the prev_revision of this EntityEdit. # noqa: E501 + UUID (lower-case, dash-separated, hex-encoded 128-bit) # noqa: E501 :return: The prev_revision of this EntityEdit. # noqa: E501 :rtype: str @@ -155,10 +180,17 @@ class EntityEdit(object): def prev_revision(self, prev_revision): """Sets the prev_revision of this EntityEdit. + UUID (lower-case, dash-separated, hex-encoded 128-bit) # 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('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501 + raise ValueError("Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._prev_revision = prev_revision @@ -166,6 +198,7 @@ class EntityEdit(object): def redirect_ident(self): """Gets the redirect_ident of this EntityEdit. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The redirect_ident of this EntityEdit. # noqa: E501 :rtype: str @@ -176,10 +209,17 @@ class EntityEdit(object): def redirect_ident(self, redirect_ident): """Sets the redirect_ident of this EntityEdit. + base32-encoded unique identifier # 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('[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501 + raise ValueError("Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._redirect_ident = redirect_ident @@ -187,6 +227,7 @@ class EntityEdit(object): def editgroup_id(self): """Gets the editgroup_id of this EntityEdit. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The editgroup_id of this EntityEdit. # noqa: E501 :rtype: str @@ -197,12 +238,19 @@ class EntityEdit(object): def editgroup_id(self, editgroup_id): """Sets the editgroup_id of this EntityEdit. + base32-encoded unique identifier # 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('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 + raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._editgroup_id = editgroup_id diff --git a/python/fatcat_client/models/file_entity.py b/python/fatcat_client/models/file_entity.py index 001f5b6e..5d0105bd 100644 --- a/python/fatcat_client/models/file_entity.py +++ b/python/fatcat_client/models/file_entity.py @@ -190,6 +190,12 @@ class FileEntity(object): :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('[a-f0-9]{64}', sha256): # noqa: E501 + raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 self._sha256 = sha256 @@ -211,6 +217,12 @@ class FileEntity(object): :param sha1: The sha1 of this FileEntity. # noqa: E501 :type: str """ + if sha1 is not None and len(sha1) > 40: + raise ValueError("Invalid value for `sha1`, length must be less than or equal to `40`") # noqa: E501 + if sha1 is not None and len(sha1) < 40: + raise ValueError("Invalid value for `sha1`, length must be greater than or equal to `40`") # noqa: E501 + if sha1 is not None and not re.search('[a-f0-9]{40}', sha1): # noqa: E501 + raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 self._sha1 = sha1 @@ -232,6 +244,12 @@ class FileEntity(object): :param md5: The md5 of this FileEntity. # noqa: E501 :type: str """ + if md5 is not None and len(md5) > 32: + raise ValueError("Invalid value for `md5`, length must be less than or equal to `32`") # noqa: E501 + if md5 is not None and len(md5) < 32: + raise ValueError("Invalid value for `md5`, length must be greater than or equal to `32`") # noqa: E501 + if md5 is not None and not re.search('[a-f0-9]{32}', md5): # noqa: E501 + raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501 self._md5 = md5 diff --git a/python/fatcat_client/models/fileset_entity_manifest.py b/python/fatcat_client/models/fileset_entity_manifest.py index 51990ebe..6dd5800f 100644 --- a/python/fatcat_client/models/fileset_entity_manifest.py +++ b/python/fatcat_client/models/fileset_entity_manifest.py @@ -134,6 +134,12 @@ class FilesetEntityManifest(object): :param md5: The md5 of this FilesetEntityManifest. # 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('[a-f0-9]{32}', md5): # noqa: E501 + raise ValueError("Invalid value for `md5`, must be a follow pattern or equal to `/[a-f0-9]{32}/`") # noqa: E501 self._md5 = md5 @@ -155,6 +161,12 @@ class FilesetEntityManifest(object): :param sha1: The sha1 of this FilesetEntityManifest. # 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('[a-f0-9]{40}', sha1): # noqa: E501 + raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 self._sha1 = sha1 @@ -176,6 +188,12 @@ class FilesetEntityManifest(object): :param sha256: The sha256 of this FilesetEntityManifest. # noqa: E501 :type: str """ + if sha256 is not None and len(sha256) > 64: + raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501 + if sha256 is not None and len(sha256) < 64: + raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501 + if sha256 is not None and not re.search('[a-f0-9]{64}', sha256): # noqa: E501 + raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 self._sha256 = sha256 diff --git a/python/fatcat_client/models/release_entity_abstracts.py b/python/fatcat_client/models/release_entity_abstracts.py index 1adf832a..2818e112 100644 --- a/python/fatcat_client/models/release_entity_abstracts.py +++ b/python/fatcat_client/models/release_entity_abstracts.py @@ -80,6 +80,12 @@ class ReleaseEntityAbstracts(object): :param sha1: The sha1 of this ReleaseEntityAbstracts. # 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('[a-f0-9]{40}', sha1): # noqa: E501 + raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 self._sha1 = sha1 diff --git a/python/fatcat_client/models/release_ref.py b/python/fatcat_client/models/release_ref.py index 99012c42..81ad9cfe 100644 --- a/python/fatcat_client/models/release_ref.py +++ b/python/fatcat_client/models/release_ref.py @@ -107,6 +107,7 @@ class ReleaseRef(object): def target_release_id(self): """Gets the target_release_id of this ReleaseRef. # noqa: E501 + base32-encoded unique identifier # noqa: E501 :return: The target_release_id of this ReleaseRef. # noqa: E501 :rtype: str @@ -117,10 +118,17 @@ class ReleaseRef(object): def target_release_id(self, target_release_id): """Sets the target_release_id of this ReleaseRef. + base32-encoded unique identifier # 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('[a-zA-Z2-7]{26}', target_release_id): # noqa: E501 + raise ValueError("Invalid value for `target_release_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._target_release_id = target_release_id diff --git a/python/fatcat_client/models/webcapture_entity_cdx.py b/python/fatcat_client/models/webcapture_entity_cdx.py index eb621d2f..a34ea2f1 100644 --- a/python/fatcat_client/models/webcapture_entity_cdx.py +++ b/python/fatcat_client/models/webcapture_entity_cdx.py @@ -32,7 +32,7 @@ class WebcaptureEntityCdx(object): """ swagger_types = { 'surt': 'str', - 'timestamp': 'int', + 'timestamp': 'str', 'url': 'str', 'mimetype': 'str', 'status_code': 'int', @@ -67,7 +67,8 @@ class WebcaptureEntityCdx(object): self.url = url if mimetype is not None: self.mimetype = mimetype - self.status_code = status_code + if status_code is not None: + self.status_code = status_code self.sha1 = sha1 if sha256 is not None: self.sha256 = sha256 @@ -101,7 +102,7 @@ class WebcaptureEntityCdx(object): :return: The timestamp of this WebcaptureEntityCdx. # noqa: E501 - :rtype: int + :rtype: str """ return self._timestamp @@ -111,7 +112,7 @@ class WebcaptureEntityCdx(object): :param timestamp: The timestamp of this WebcaptureEntityCdx. # noqa: E501 - :type: int + :type: str """ if timestamp is None: raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 @@ -180,8 +181,6 @@ class WebcaptureEntityCdx(object): :param status_code: The status_code of this WebcaptureEntityCdx. # noqa: E501 :type: int """ - if status_code is None: - raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501 self._status_code = status_code @@ -205,6 +204,12 @@ class WebcaptureEntityCdx(object): """ 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('[a-f0-9]{40}', sha1): # noqa: E501 + raise ValueError("Invalid value for `sha1`, must be a follow pattern or equal to `/[a-f0-9]{40}/`") # noqa: E501 self._sha1 = sha1 @@ -226,6 +231,12 @@ class WebcaptureEntityCdx(object): :param sha256: The sha256 of this WebcaptureEntityCdx. # noqa: E501 :type: str """ + if sha256 is not None and len(sha256) > 64: + raise ValueError("Invalid value for `sha256`, length must be less than or equal to `64`") # noqa: E501 + if sha256 is not None and len(sha256) < 64: + raise ValueError("Invalid value for `sha256`, length must be greater than or equal to `64`") # noqa: E501 + if sha256 is not None and not re.search('[a-f0-9]{64}', sha256): # noqa: E501 + raise ValueError("Invalid value for `sha256`, must be a follow pattern or equal to `/[a-f0-9]{64}/`") # noqa: E501 self._sha256 = sha256 |