From 81578786f745142364fac58b86d79b5c1e2c0b4b Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:17:29 +0100 Subject: [PATCH 1/9] Add new template for string enums --- .../templates/str_enum.py.jinja | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 component_registry_bindings/templates/str_enum.py.jinja diff --git a/component_registry_bindings/templates/str_enum.py.jinja b/component_registry_bindings/templates/str_enum.py.jinja new file mode 100644 index 0000000..30056dc --- /dev/null +++ b/component_registry_bindings/templates/str_enum.py.jinja @@ -0,0 +1,13 @@ +{# + This is a custom template derived from: + https://github.com/openapi-generators/openapi-python-client/blob/v.0.10.7/openapi_python_client/templates/str_enum.py.jinja +#} +from enum import Enum + +class {{ enum.class_info.name }}(str, Enum): + {% for key, value in enum.values.items() %} + {{ key }} = "{{ value }}" + {% endfor %} + + def __str__(self) -> str: + return str(self.value) From 2532dbe6f66ce25c40e958e4c9203289078c9e1e Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:17:58 +0100 Subject: [PATCH 2/9] Modify string enum template to accept empty value --- component_registry_bindings/templates/str_enum.py.jinja | 2 ++ 1 file changed, 2 insertions(+) diff --git a/component_registry_bindings/templates/str_enum.py.jinja b/component_registry_bindings/templates/str_enum.py.jinja index 30056dc..49ca0eb 100644 --- a/component_registry_bindings/templates/str_enum.py.jinja +++ b/component_registry_bindings/templates/str_enum.py.jinja @@ -8,6 +8,8 @@ class {{ enum.class_info.name }}(str, Enum): {% for key, value in enum.values.items() %} {{ key }} = "{{ value }}" {% endfor %} + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) From b13fa0e57d96053269e6b81d4767eeda31debdfa Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:29:55 +0100 Subject: [PATCH 3/9] Implement pagination handler --- TUTORIAL.md | 2 +- component_registry_bindings/session.py | 76 +++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/TUTORIAL.md b/TUTORIAL.md index 39f5d92..ce93f8e 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -160,4 +160,4 @@ Which can then be converted to a dictionary. single_response_dict = single_response.to_dict() ``` -**NOTE - soon we will provide list of models (instead of nested in results) as well as handle pagination** +Each paginated response comes also with pagination helpers which allows user to conveniently browse through all the pages without the need to adjust offset or limit. These methods are `.next()`, `.prev()` for basic navigation in both directions and .iterator()` which returns iterable enabling looping through the responses in for loop. diff --git a/component_registry_bindings/session.py b/component_registry_bindings/session.py index ad8b715..febff2b 100644 --- a/component_registry_bindings/session.py +++ b/component_registry_bindings/session.py @@ -1,4 +1,6 @@ import importlib +import re +from functools import partial from types import ModuleType from typing import Any, Callable, Dict, List, Union @@ -129,6 +131,33 @@ def __get_method_module(self, resource_name: str, method: str) -> ModuleType: package="component_registry_bindings", ) + def __make_iterable(self, response, **kwargs): + """ + Populate next, prev and iterator helper methods for paginated responses + """ + + response.iterator = Paginator( + session_operation=self.retrieve_list, init_response=response + ) + + for param_name, func_name in (("next_", "next"), ("previous", "prev")): + kwargs.pop("limit", None) + kwargs.pop("offset", None) + param = getattr(response, param_name, None) + if param is None: + setattr(response, func_name, lambda: None) + else: + limit = re.search("limit=(\d+)", param) + if limit is not None: + kwargs["limit"] = limit.group(1) + offset = re.search("offset=(\d+)", param) + if offset is not None: + kwargs["offset"] = offset.group(1) + + setattr(response, func_name, partial(self.retrieve_list, **kwargs)) + + return response + # CRUD operations def retrieve(self, id, **kwargs): @@ -150,7 +179,7 @@ def retrieve_list(self, **kwargs): resource_name=self.resource_name, method="list" ) sync_fn = get_sync_function(method_module) - return sync_fn(client=self.client, **kwargs) + return self.__make_iterable(sync_fn(client=self.client, **kwargs), **kwargs) else: raise OperationUnsupported( 'Operation "retrieve_list" is not supported for the ' @@ -273,3 +302,48 @@ def retrieve_manifest(self, id, **kwargs): 'Operation "retrieve_manifest" is not supported for the ' f'"{self.resource_name}" resource.' ) + + +class Paginator: + """ + Iterable for handling API pagination. + + Receives either starting limit and offset or already existing response from which + it should continue. + + It keeps calling `.next()` response until pages are exhausted. + """ + + def __init__( + self, + session_operation: Callable, + limit: int = 100, + offset: int = 0, + init_response=None, + **kwargs, + ): + self.session_operation = session_operation + self.__init_limit = limit + self.__init_offset = offset + self.__init_response = init_response + self.current_response = init_response + self.kwargs = kwargs + + def __iter__(self): + self.current_response = self.__init_response + return self + + def __next__(self): + if self.current_response is None: + response = self.session_operation( + limit=self.__init_limit, offset=self.__init_offset, **self.kwargs + ) + self.current_response = response + return response + else: + response = self.current_response.next() + if response is not None: + self.current_response = response + return response + else: + raise StopIteration From c9a146f53d7270dc114d8c9d387af6ae5fe922c9 Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:32:49 +0100 Subject: [PATCH 4/9] Add new staticmethod for fields obtaining --- component_registry_bindings/templates/model.py.jinja | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/component_registry_bindings/templates/model.py.jinja b/component_registry_bindings/templates/model.py.jinja index 3637530..e34f755 100644 --- a/component_registry_bindings/templates/model.py.jinja +++ b/component_registry_bindings/templates/model.py.jinja @@ -124,6 +124,14 @@ return field_dict {% endif %} return {{ module_name }} + @staticmethod + def get_fields(): + return { + {% for property in model.required_properties + model.optional_properties %} + "{{ property.name }}": {{ property.get_type_string(no_optional=True) }}, + {% endfor %} + } + {% if model.additional_properties %} @property def additional_keys(self) -> List[str]: From 9eb32636ab0f0f14a6480a1d579c05292112fe66 Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:35:23 +0100 Subject: [PATCH 5/9] Add new dictionary for getting the query params --- .../templates/endpoint_module.py.jinja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/component_registry_bindings/templates/endpoint_module.py.jinja b/component_registry_bindings/templates/endpoint_module.py.jinja index b4c57f8..608d706 100644 --- a/component_registry_bindings/templates/endpoint_module.py.jinja +++ b/component_registry_bindings/templates/endpoint_module.py.jinja @@ -111,4 +111,10 @@ def sync( return sync_detailed( {{ kwargs(endpoint) }} ).parsed + +QUERY_PARAMS = { + {% for parameter in endpoint.query_parameters.values() %} + "{{ parameter.name }}": {{ parameter.get_type_string(no_optional=True) }}, + {% endfor %} +} {% endif %} From 21c5a337488b37acb9201ffd0d744e709cf9007e Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:35:45 +0100 Subject: [PATCH 6/9] Add base template for endpoint init --- component_registry_bindings/templates/endpoint_init.py.jinja | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 component_registry_bindings/templates/endpoint_init.py.jinja diff --git a/component_registry_bindings/templates/endpoint_init.py.jinja b/component_registry_bindings/templates/endpoint_init.py.jinja new file mode 100644 index 0000000..7110974 --- /dev/null +++ b/component_registry_bindings/templates/endpoint_init.py.jinja @@ -0,0 +1,4 @@ +{# + This is a custom template derived from: + https://github.com/openapi-generators/openapi-python-client/blob/v.0.10.7/openapi_python_client/templates/endpoint_init.py.jinja +#} From 44251b76cc01ff96cb67fc70b223e687cf80875a Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:36:40 +0100 Subject: [PATCH 7/9] Expose endpoint query params via __init__ --- component_registry_bindings/templates/endpoint_init.py.jinja | 3 +++ 1 file changed, 3 insertions(+) diff --git a/component_registry_bindings/templates/endpoint_init.py.jinja b/component_registry_bindings/templates/endpoint_init.py.jinja index 7110974..bed1ccd 100644 --- a/component_registry_bindings/templates/endpoint_init.py.jinja +++ b/component_registry_bindings/templates/endpoint_init.py.jinja @@ -2,3 +2,6 @@ This is a custom template derived from: https://github.com/openapi-generators/openapi-python-client/blob/v.0.10.7/openapi_python_client/templates/endpoint_init.py.jinja #} +{% for endpoint in endpoint_collection.endpoints %} +from .{{ endpoint.name }} import * +{% endfor %} From 5dc0be34935d1bfcecc10e2f34ba0821e5aca68b Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:40:48 +0100 Subject: [PATCH 8/9] Regenerate bindings --- .../python_client/api/healthy/__init__.py | 1 + .../bindings/python_client/api/v1/__init__.py | 21 ++++++++++ .../python_client/api/v1/v1_builds_list.py | 12 ++++++ .../api/v1/v1_builds_retrieve.py | 6 +++ .../python_client/api/v1/v1_channels_list.py | 11 +++++ .../api/v1/v1_channels_retrieve.py | 6 +++ .../api/v1/v1_components_list.py | 36 ++++++++++++++++ .../api/v1/v1_components_manifest_retrieve.py | 3 ++ .../api/v1/v1_components_olcs_test_update.py | 3 ++ .../api/v1/v1_components_provides_retrieve.py | 3 ++ .../api/v1/v1_components_retrieve.py | 6 +++ .../api/v1/v1_components_taxonomy_retrieve.py | 3 ++ .../api/v1/v1_product_streams_list.py | 19 +++++++++ .../v1_product_streams_manifest_retrieve.py | 3 ++ .../api/v1/v1_product_streams_retrieve.py | 6 +++ .../api/v1/v1_product_variants_list.py | 18 ++++++++ .../api/v1/v1_product_variants_retrieve.py | 6 +++ .../api/v1/v1_product_versions_list.py | 18 ++++++++ .../api/v1/v1_product_versions_retrieve.py | 6 +++ .../python_client/api/v1/v1_products_list.py | 18 ++++++++ .../api/v1/v1_products_retrieve.py | 6 +++ .../api/v1/v1_schema_retrieve.py | 5 +++ .../python_client/api/v1/v1_status_list.py | 6 +++ .../python_client/models/build_type_enum.py | 1 + .../bindings/python_client/models/channel.py | 17 ++++++++ .../models/channel_product_streams_item.py | 4 ++ .../models/channel_product_variants_item.py | 4 ++ .../models/channel_product_versions_item.py | 4 ++ .../models/channel_products_item.py | 4 ++ .../python_client/models/channel_type_enum.py | 1 + .../python_client/models/component.py | 41 +++++++++++++++++++ .../models/component_channels_item.py | 4 ++ .../models/component_product_streams_item.py | 4 ++ .../models/component_product_variants_item.py | 4 ++ .../models/component_product_versions_item.py | 4 ++ .../models/component_products_item.py | 4 ++ .../models/component_provides_item.py | 4 ++ .../models/component_sources_item.py | 4 ++ .../models/component_type_enum.py | 1 + .../models/component_upstreams_item.py | 4 ++ .../python_client/models/namespace_enum.py | 1 + .../models/paginated_channel_list.py | 9 ++++ .../models/paginated_component_list.py | 9 ++++ .../models/paginated_product_list.py | 9 ++++ .../models/paginated_product_stream_list.py | 9 ++++ .../models/paginated_product_variant_list.py | 9 ++++ .../models/paginated_product_version_list.py | 9 ++++ .../models/paginated_software_build_list.py | 9 ++++ .../bindings/python_client/models/product.py | 19 +++++++++ .../models/product_channels_item.py | 4 ++ .../models/product_product_streams_item.py | 4 ++ .../models/product_product_variants_item.py | 4 ++ .../models/product_product_versions_item.py | 4 ++ .../python_client/models/product_stream.py | 27 ++++++++++++ .../models/product_stream_brew_tags.py | 4 ++ .../models/product_stream_channels_item.py | 4 ++ .../models/product_stream_composes.py | 4 ++ .../product_stream_product_variants_item.py | 4 ++ .../product_stream_product_versions_item.py | 4 ++ .../models/product_stream_products_item.py | 4 ++ .../models/product_stream_relations_item.py | 4 ++ .../python_client/models/product_variant.py | 20 +++++++++ .../models/product_variant_channels_item.py | 4 ++ .../product_variant_product_streams_item.py | 4 ++ .../product_variant_product_versions_item.py | 4 ++ .../models/product_variant_products_item.py | 4 ++ .../models/product_variant_relations_item.py | 4 ++ .../python_client/models/product_version.py | 19 +++++++++ .../models/product_version_channels_item.py | 4 ++ .../product_version_product_streams_item.py | 4 ++ .../product_version_product_variants_item.py | 4 ++ .../models/product_version_products_item.py | 4 ++ .../python_client/models/software_build.py | 15 +++++++ .../models/software_build_components_item.py | 4 ++ .../models/software_build_summary.py | 10 +++++ .../bindings/python_client/models/tag.py | 8 ++++ .../models/v1_builds_list_build_type.py | 2 + .../models/v1_channels_list_type.py | 2 + .../models/v1_components_list_namespace.py | 2 + .../models/v1_components_list_type.py | 2 + .../models/v1_schema_retrieve_format.py | 2 + .../models/v1_schema_retrieve_response_200.py | 4 ++ .../models/v1_status_list_response_200.py | 9 ++++ ...1_status_list_response_200_results_item.py | 18 ++++++++ ...s_list_response_200_results_item_builds.py | 6 +++ ...list_response_200_results_item_channels.py | 6 +++ ...st_response_200_results_item_components.py | 6 +++ ...sponse_200_results_item_product_streams.py | 6 +++ ...ponse_200_results_item_product_variants.py | 6 +++ ...ponse_200_results_item_product_versions.py | 6 +++ ...list_response_200_results_item_products.py | 6 +++ ...ist_response_200_results_item_relations.py | 6 +++ 92 files changed, 686 insertions(+) diff --git a/component_registry_bindings/bindings/python_client/api/healthy/__init__.py b/component_registry_bindings/bindings/python_client/api/healthy/__init__.py index e69de29..8b45f36 100644 --- a/component_registry_bindings/bindings/python_client/api/healthy/__init__.py +++ b/component_registry_bindings/bindings/python_client/api/healthy/__init__.py @@ -0,0 +1 @@ +from .healthy_retrieve import * diff --git a/component_registry_bindings/bindings/python_client/api/v1/__init__.py b/component_registry_bindings/bindings/python_client/api/v1/__init__.py index e69de29..396e842 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/__init__.py +++ b/component_registry_bindings/bindings/python_client/api/v1/__init__.py @@ -0,0 +1,21 @@ +from .v1_builds_list import * +from .v1_builds_retrieve import * +from .v1_channels_list import * +from .v1_channels_retrieve import * +from .v1_components_list import * +from .v1_components_manifest_retrieve import * +from .v1_components_olcs_test_update import * +from .v1_components_provides_retrieve import * +from .v1_components_retrieve import * +from .v1_components_taxonomy_retrieve import * +from .v1_product_streams_list import * +from .v1_product_streams_manifest_retrieve import * +from .v1_product_streams_retrieve import * +from .v1_product_variants_list import * +from .v1_product_variants_retrieve import * +from .v1_product_versions_list import * +from .v1_product_versions_retrieve import * +from .v1_products_list import * +from .v1_products_retrieve import * +from .v1_schema_retrieve import * +from .v1_status_list import * diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py index 6dca005..f94d379 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py @@ -152,3 +152,15 @@ def sync( search=search, tags=tags, ).parsed + + +QUERY_PARAMS = { + "build_type": V1BuildsListBuildType, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "search": str, + "tags": int, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py index 6e110ab..7a591cc 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_channels_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_channels_list.py index e86254a..ab634c1 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_channels_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_channels_list.py @@ -140,3 +140,14 @@ def sync( search=search, type=type, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "search": str, + "type": V1ChannelsListType, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_channels_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_channels_retrieve.py index 4289e2a..f434a9b 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_channels_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_channels_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py index 694541b..a92c8bd 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py @@ -298,3 +298,39 @@ def sync( version=version, view=view, ).parsed + + +QUERY_PARAMS = { + "arch": str, + "channels": str, + "description": str, + "el_match": str, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "missing_copyright": bool, + "missing_license": bool, + "name": str, + "namespace": V1ComponentsListNamespace, + "nevra": str, + "nvr": str, + "offset": int, + "ofuri": str, + "product_streams": str, + "product_variants": str, + "product_versions": str, + "products": str, + "provides": str, + "purl": str, + "re_name": str, + "re_purl": str, + "re_upstream": str, + "release": str, + "search": str, + "sources": str, + "tags": int, + "type": V1ComponentsListType, + "upstreams": str, + "version": str, + "view": str, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_manifest_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_manifest_retrieve.py index 140dc5e..ad6f396 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_manifest_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_manifest_retrieve.py @@ -79,3 +79,6 @@ def sync( uuid=uuid, client=client, ).parsed + + +QUERY_PARAMS = {} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py index 6562643..5721870 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py @@ -103,3 +103,6 @@ def sync( multipart_data=multipart_data, json_body=json_body, ).parsed + + +QUERY_PARAMS = {} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py index 056b247..c379b11 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py @@ -79,3 +79,6 @@ def sync( uuid=uuid, client=client, ).parsed + + +QUERY_PARAMS = {} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_retrieve.py index a5b8f48..ddcf958 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_taxonomy_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_taxonomy_retrieve.py index ad6e4d6..ea98a3e 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_taxonomy_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_taxonomy_retrieve.py @@ -79,3 +79,6 @@ def sync( uuid=uuid, client=client, ).parsed + + +QUERY_PARAMS = {} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_list.py index 8873193..61f10b2 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_list.py @@ -186,3 +186,22 @@ def sync( search=search, tags=tags, ).parsed + + +QUERY_PARAMS = { + "active": str, + "channels": str, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "product_streams": str, + "product_variants": str, + "product_versions": str, + "products": str, + "re_name": str, + "re_ofuri": str, + "search": str, + "tags": int, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_manifest_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_manifest_retrieve.py index 5556738..99c9d75 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_manifest_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_manifest_retrieve.py @@ -79,3 +79,6 @@ def sync( uuid=uuid, client=client, ).parsed + + +QUERY_PARAMS = {} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_retrieve.py index b99b55e..9dcb596 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_streams_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_list.py index 21af4ee..e62a577 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_list.py @@ -180,3 +180,21 @@ def sync( search=search, tags=tags, ).parsed + + +QUERY_PARAMS = { + "channels": str, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "product_streams": str, + "product_variants": str, + "product_versions": str, + "products": str, + "re_name": str, + "re_ofuri": str, + "search": str, + "tags": int, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_retrieve.py index 887109e..a8786e3 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_variants_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_list.py index f1c4bd4..dc74286 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_list.py @@ -180,3 +180,21 @@ def sync( search=search, tags=tags, ).parsed + + +QUERY_PARAMS = { + "channels": str, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "product_streams": str, + "product_variants": str, + "product_versions": str, + "products": str, + "re_name": str, + "re_ofuri": str, + "search": str, + "tags": int, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_retrieve.py index 1bd59e2..34316c6 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_product_versions_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_products_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_products_list.py index 50afdb9..b618a73 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_products_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_products_list.py @@ -176,3 +176,21 @@ def sync( search=search, tags=tags, ).parsed + + +QUERY_PARAMS = { + "channels": str, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "name": str, + "offset": int, + "product_streams": str, + "product_variants": str, + "product_versions": str, + "products": str, + "re_name": str, + "re_ofuri": str, + "search": str, + "tags": int, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_products_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_products_retrieve.py index 91b1e6e..8bb44ca 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_products_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_products_retrieve.py @@ -110,3 +110,9 @@ def sync( exclude_fields=exclude_fields, include_fields=include_fields, ).parsed + + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_schema_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_schema_retrieve.py index 8ee161d..d21feb5 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_schema_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_schema_retrieve.py @@ -97,3 +97,8 @@ def sync( client=client, format_=format_, ).parsed + + +QUERY_PARAMS = { + "format": V1SchemaRetrieveFormat, +} diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_status_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_status_list.py index f151973..78f98de 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_status_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_status_list.py @@ -94,3 +94,9 @@ def sync( limit=limit, offset=offset, ).parsed + + +QUERY_PARAMS = { + "limit": int, + "offset": int, +} diff --git a/component_registry_bindings/bindings/python_client/models/build_type_enum.py b/component_registry_bindings/bindings/python_client/models/build_type_enum.py index f4e1923..a15de72 100644 --- a/component_registry_bindings/bindings/python_client/models/build_type_enum.py +++ b/component_registry_bindings/bindings/python_client/models/build_type_enum.py @@ -4,6 +4,7 @@ class BuildTypeEnum(str, Enum): BREW = "BREW" KOJI = "KOJI" + # This is a temporary tweak to accept empty Enum NONE = "" def __str__(self) -> str: diff --git a/component_registry_bindings/bindings/python_client/models/channel.py b/component_registry_bindings/bindings/python_client/models/channel.py index 5313d51..da3b0ed 100644 --- a/component_registry_bindings/bindings/python_client/models/channel.py +++ b/component_registry_bindings/bindings/python_client/models/channel.py @@ -239,6 +239,23 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channel.additional_properties = d return channel + @staticmethod + def get_fields(): + return { + "uuid": str, + "link": str, + "last_changed": datetime.datetime, + "created_at": datetime.datetime, + "name": str, + "relative_url": str, + "type": ChannelTypeEnum, + "description": str, + "products": List[ChannelProductsItem], + "product_versions": List[ChannelProductVersionsItem], + "product_streams": List[ChannelProductStreamsItem], + "product_variants": List[ChannelProductVariantsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/channel_product_streams_item.py b/component_registry_bindings/bindings/python_client/models/channel_product_streams_item.py index 4f05d4c..e8fc8af 100644 --- a/component_registry_bindings/bindings/python_client/models/channel_product_streams_item.py +++ b/component_registry_bindings/bindings/python_client/models/channel_product_streams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channel_product_streams_item.additional_properties = d return channel_product_streams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/channel_product_variants_item.py b/component_registry_bindings/bindings/python_client/models/channel_product_variants_item.py index 3de25be..78acffd 100644 --- a/component_registry_bindings/bindings/python_client/models/channel_product_variants_item.py +++ b/component_registry_bindings/bindings/python_client/models/channel_product_variants_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channel_product_variants_item.additional_properties = d return channel_product_variants_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/channel_product_versions_item.py b/component_registry_bindings/bindings/python_client/models/channel_product_versions_item.py index 3c54cc9..6f6b862 100644 --- a/component_registry_bindings/bindings/python_client/models/channel_product_versions_item.py +++ b/component_registry_bindings/bindings/python_client/models/channel_product_versions_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channel_product_versions_item.additional_properties = d return channel_product_versions_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/channel_products_item.py b/component_registry_bindings/bindings/python_client/models/channel_products_item.py index ccf3aea..c9c3589 100644 --- a/component_registry_bindings/bindings/python_client/models/channel_products_item.py +++ b/component_registry_bindings/bindings/python_client/models/channel_products_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channel_products_item.additional_properties = d return channel_products_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/channel_type_enum.py b/component_registry_bindings/bindings/python_client/models/channel_type_enum.py index 02f133a..3a6a06d 100644 --- a/component_registry_bindings/bindings/python_client/models/channel_type_enum.py +++ b/component_registry_bindings/bindings/python_client/models/channel_type_enum.py @@ -4,6 +4,7 @@ class ChannelTypeEnum(str, Enum): CDN_REPO = "CDN_REPO" CONTAINER_REGISTRY = "CONTAINER_REGISTRY" + # This is a temporary tweak to accept empty Enum NONE = "" def __str__(self) -> str: diff --git a/component_registry_bindings/bindings/python_client/models/component.py b/component_registry_bindings/bindings/python_client/models/component.py index 6ce59f5..c23af88 100644 --- a/component_registry_bindings/bindings/python_client/models/component.py +++ b/component_registry_bindings/bindings/python_client/models/component.py @@ -850,6 +850,47 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component.additional_properties = d return component + @staticmethod + def get_fields(): + return { + "link": str, + "download_url": str, + "uuid": str, + "type": ComponentTypeEnum, + "namespace": NamespaceEnum, + "purl": str, + "name": str, + "description": str, + "related_url": str, + "tags": List[Tag], + "version": str, + "release": str, + "el_match": List[str], + "arch": str, + "nvr": str, + "nevra": str, + "epoch": str, + "copyright_text": str, + "license_concluded": str, + "license_concluded_list": List[str], + "license_declared": str, + "license_declared_list": List[str], + "openlcs_scan_url": str, + "openlcs_scan_version": str, + "software_build": SoftwareBuildSummary, + "errata": List[str], + "products": List[ComponentProductsItem], + "product_versions": List[ComponentProductVersionsItem], + "product_streams": List[ComponentProductStreamsItem], + "product_variants": List[ComponentProductVariantsItem], + "channels": List[ComponentChannelsItem], + "sources": List[ComponentSourcesItem], + "provides": List[ComponentProvidesItem], + "upstreams": List[ComponentUpstreamsItem], + "manifest": str, + "filename": str, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_channels_item.py b/component_registry_bindings/bindings/python_client/models/component_channels_item.py index cd79154..eb38e74 100644 --- a/component_registry_bindings/bindings/python_client/models/component_channels_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_channels_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_channels_item.additional_properties = d return component_channels_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_product_streams_item.py b/component_registry_bindings/bindings/python_client/models/component_product_streams_item.py index 6547068..6eede34 100644 --- a/component_registry_bindings/bindings/python_client/models/component_product_streams_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_product_streams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_product_streams_item.additional_properties = d return component_product_streams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_product_variants_item.py b/component_registry_bindings/bindings/python_client/models/component_product_variants_item.py index 649146f..9d979af 100644 --- a/component_registry_bindings/bindings/python_client/models/component_product_variants_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_product_variants_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_product_variants_item.additional_properties = d return component_product_variants_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_product_versions_item.py b/component_registry_bindings/bindings/python_client/models/component_product_versions_item.py index 7d64cad..5c62e20 100644 --- a/component_registry_bindings/bindings/python_client/models/component_product_versions_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_product_versions_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_product_versions_item.additional_properties = d return component_product_versions_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_products_item.py b/component_registry_bindings/bindings/python_client/models/component_products_item.py index 362d5a5..1706aaf 100644 --- a/component_registry_bindings/bindings/python_client/models/component_products_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_products_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_products_item.additional_properties = d return component_products_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_provides_item.py b/component_registry_bindings/bindings/python_client/models/component_provides_item.py index 9d78c8d..ca6541c 100644 --- a/component_registry_bindings/bindings/python_client/models/component_provides_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_provides_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_provides_item.additional_properties = d return component_provides_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_sources_item.py b/component_registry_bindings/bindings/python_client/models/component_sources_item.py index 2180f50..2692843 100644 --- a/component_registry_bindings/bindings/python_client/models/component_sources_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_sources_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_sources_item.additional_properties = d return component_sources_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/component_type_enum.py b/component_registry_bindings/bindings/python_client/models/component_type_enum.py index fda7225..51eb190 100644 --- a/component_registry_bindings/bindings/python_client/models/component_type_enum.py +++ b/component_registry_bindings/bindings/python_client/models/component_type_enum.py @@ -13,6 +13,7 @@ class ComponentTypeEnum(str, Enum): RPMMOD = "RPMMOD" RPM = "RPM" PYPI = "PYPI" + # This is a temporary tweak to accept empty Enum NONE = "" def __str__(self) -> str: diff --git a/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py b/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py index 88391fe..cf1221a 100644 --- a/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py +++ b/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: component_upstreams_item.additional_properties = d return component_upstreams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/namespace_enum.py b/component_registry_bindings/bindings/python_client/models/namespace_enum.py index 16f1a71..6ca1247 100644 --- a/component_registry_bindings/bindings/python_client/models/namespace_enum.py +++ b/component_registry_bindings/bindings/python_client/models/namespace_enum.py @@ -4,6 +4,7 @@ class NamespaceEnum(str, Enum): UPSTREAM = "UPSTREAM" REDHAT = "REDHAT" + # This is a temporary tweak to accept empty Enum NONE = "" def __str__(self) -> str: diff --git a/component_registry_bindings/bindings/python_client/models/paginated_channel_list.py b/component_registry_bindings/bindings/python_client/models/paginated_channel_list.py index 88aa876..14df5fb 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_channel_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_channel_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_channel_list.additional_properties = d return paginated_channel_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[Channel], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_component_list.py b/component_registry_bindings/bindings/python_client/models/paginated_component_list.py index 3ff2486..c94b489 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_component_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_component_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_component_list.additional_properties = d return paginated_component_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[Component], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_product_list.py b/component_registry_bindings/bindings/python_client/models/paginated_product_list.py index 4014dee..c52eea9 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_product_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_product_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_product_list.additional_properties = d return paginated_product_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[Product], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_product_stream_list.py b/component_registry_bindings/bindings/python_client/models/paginated_product_stream_list.py index 9ad5295..e4f177c 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_product_stream_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_product_stream_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_product_stream_list.additional_properties = d return paginated_product_stream_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[ProductStream], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_product_variant_list.py b/component_registry_bindings/bindings/python_client/models/paginated_product_variant_list.py index dea6407..9dce13d 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_product_variant_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_product_variant_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_product_variant_list.additional_properties = d return paginated_product_variant_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[ProductVariant], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_product_version_list.py b/component_registry_bindings/bindings/python_client/models/paginated_product_version_list.py index 6d5ff7e..409304b 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_product_version_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_product_version_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_product_version_list.additional_properties = d return paginated_product_version_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[ProductVersion], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/paginated_software_build_list.py b/component_registry_bindings/bindings/python_client/models/paginated_software_build_list.py index 5a9dbda..657ac52 100644 --- a/component_registry_bindings/bindings/python_client/models/paginated_software_build_list.py +++ b/component_registry_bindings/bindings/python_client/models/paginated_software_build_list.py @@ -79,6 +79,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: paginated_software_build_list.additional_properties = d return paginated_software_build_list + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[SoftwareBuild], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product.py b/component_registry_bindings/bindings/python_client/models/product.py index 26ac8f5..6eb1ea1 100644 --- a/component_registry_bindings/bindings/python_client/models/product.py +++ b/component_registry_bindings/bindings/python_client/models/product.py @@ -248,6 +248,25 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product.additional_properties = d return product + @staticmethod + def get_fields(): + return { + "link": str, + "uuid": str, + "ofuri": str, + "name": str, + "description": str, + "build_count": int, + "builds": str, + "components": str, + "upstreams": str, + "tags": List[Tag], + "channels": List[ProductChannelsItem], + "product_versions": List[ProductProductVersionsItem], + "product_streams": List[ProductProductStreamsItem], + "product_variants": List[ProductProductVariantsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_channels_item.py b/component_registry_bindings/bindings/python_client/models/product_channels_item.py index 40f86e5..fd95de5 100644 --- a/component_registry_bindings/bindings/python_client/models/product_channels_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_channels_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_channels_item.additional_properties = d return product_channels_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_product_streams_item.py b/component_registry_bindings/bindings/python_client/models/product_product_streams_item.py index a19ce47..47e9591 100644 --- a/component_registry_bindings/bindings/python_client/models/product_product_streams_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_product_streams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_product_streams_item.additional_properties = d return product_product_streams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_product_variants_item.py b/component_registry_bindings/bindings/python_client/models/product_product_variants_item.py index d40cb67..2b378f8 100644 --- a/component_registry_bindings/bindings/python_client/models/product_product_variants_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_product_variants_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_product_variants_item.additional_properties = d return product_product_variants_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_product_versions_item.py b/component_registry_bindings/bindings/python_client/models/product_product_versions_item.py index 77366ed..682d78a 100644 --- a/component_registry_bindings/bindings/python_client/models/product_product_versions_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_product_versions_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_product_versions_item.additional_properties = d return product_product_versions_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream.py b/component_registry_bindings/bindings/python_client/models/product_stream.py index e141874..2e97077 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream.py @@ -355,6 +355,33 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream.additional_properties = d return product_stream + @staticmethod + def get_fields(): + return { + "link": str, + "uuid": str, + "ofuri": str, + "name": str, + "description": str, + "build_count": int, + "builds": str, + "components": str, + "upstreams": str, + "tags": List[Tag], + "channels": List[ProductStreamChannelsItem], + "cpe": str, + "active": bool, + "brew_tags": ProductStreamBrewTags, + "yum_repositories": List[str], + "composes": ProductStreamComposes, + "et_product_versions": List[str], + "manifest": str, + "relations": List[ProductStreamRelationsItem], + "products": List[ProductStreamProductsItem], + "product_versions": List[ProductStreamProductVersionsItem], + "product_variants": List[ProductStreamProductVariantsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_brew_tags.py b/component_registry_bindings/bindings/python_client/models/product_stream_brew_tags.py index 921736c..c4876d9 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_brew_tags.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_brew_tags.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_brew_tags.additional_properties = d return product_stream_brew_tags + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_channels_item.py b/component_registry_bindings/bindings/python_client/models/product_stream_channels_item.py index 9831d61..05b3d82 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_channels_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_channels_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_channels_item.additional_properties = d return product_stream_channels_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_composes.py b/component_registry_bindings/bindings/python_client/models/product_stream_composes.py index f596349..ed6b0e3 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_composes.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_composes.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_composes.additional_properties = d return product_stream_composes + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_product_variants_item.py b/component_registry_bindings/bindings/python_client/models/product_stream_product_variants_item.py index c14310c..72cdc07 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_product_variants_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_product_variants_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_product_variants_item.additional_properties = d return product_stream_product_variants_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_product_versions_item.py b/component_registry_bindings/bindings/python_client/models/product_stream_product_versions_item.py index 6b3bbf5..83015bf 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_product_versions_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_product_versions_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_product_versions_item.additional_properties = d return product_stream_product_versions_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_products_item.py b/component_registry_bindings/bindings/python_client/models/product_stream_products_item.py index 842a681..c6462d7 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_products_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_products_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_products_item.additional_properties = d return product_stream_products_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_stream_relations_item.py b/component_registry_bindings/bindings/python_client/models/product_stream_relations_item.py index 183dd21..c73b5d7 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream_relations_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream_relations_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_stream_relations_item.additional_properties = d return product_stream_relations_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant.py b/component_registry_bindings/bindings/python_client/models/product_variant.py index 67a7b8d..4df4d35 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant.py @@ -282,6 +282,26 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant.additional_properties = d return product_variant + @staticmethod + def get_fields(): + return { + "link": str, + "uuid": str, + "ofuri": str, + "name": str, + "description": str, + "build_count": int, + "builds": str, + "components": str, + "upstreams": str, + "tags": List[Tag], + "channels": List[ProductVariantChannelsItem], + "relations": List[ProductVariantRelationsItem], + "products": List[ProductVariantProductsItem], + "product_versions": List[ProductVariantProductVersionsItem], + "product_streams": List[ProductVariantProductStreamsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant_channels_item.py b/component_registry_bindings/bindings/python_client/models/product_variant_channels_item.py index 6c5174c..5bc4579 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant_channels_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant_channels_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant_channels_item.additional_properties = d return product_variant_channels_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant_product_streams_item.py b/component_registry_bindings/bindings/python_client/models/product_variant_product_streams_item.py index c7b29ef..21b78bd 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant_product_streams_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant_product_streams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant_product_streams_item.additional_properties = d return product_variant_product_streams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant_product_versions_item.py b/component_registry_bindings/bindings/python_client/models/product_variant_product_versions_item.py index 466ab0d..019784e 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant_product_versions_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant_product_versions_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant_product_versions_item.additional_properties = d return product_variant_product_versions_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant_products_item.py b/component_registry_bindings/bindings/python_client/models/product_variant_products_item.py index 4071fb7..bc69317 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant_products_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant_products_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant_products_item.additional_properties = d return product_variant_products_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_variant_relations_item.py b/component_registry_bindings/bindings/python_client/models/product_variant_relations_item.py index 871af94..4ad879a 100644 --- a/component_registry_bindings/bindings/python_client/models/product_variant_relations_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_variant_relations_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_variant_relations_item.additional_properties = d return product_variant_relations_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_version.py b/component_registry_bindings/bindings/python_client/models/product_version.py index 89fc241..532bfa7 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version.py +++ b/component_registry_bindings/bindings/python_client/models/product_version.py @@ -250,6 +250,25 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_version.additional_properties = d return product_version + @staticmethod + def get_fields(): + return { + "link": str, + "uuid": str, + "ofuri": str, + "name": str, + "description": str, + "build_count": int, + "builds": str, + "components": str, + "upstreams": str, + "tags": List[Tag], + "channels": List[ProductVersionChannelsItem], + "products": List[ProductVersionProductsItem], + "product_streams": List[ProductVersionProductStreamsItem], + "product_variants": List[ProductVersionProductVariantsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_version_channels_item.py b/component_registry_bindings/bindings/python_client/models/product_version_channels_item.py index 33f7b2c..812c41d 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version_channels_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_version_channels_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_version_channels_item.additional_properties = d return product_version_channels_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_version_product_streams_item.py b/component_registry_bindings/bindings/python_client/models/product_version_product_streams_item.py index 3ad5213..c3c8a34 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version_product_streams_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_version_product_streams_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_version_product_streams_item.additional_properties = d return product_version_product_streams_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_version_product_variants_item.py b/component_registry_bindings/bindings/python_client/models/product_version_product_variants_item.py index 5835bd0..ebc183e 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version_product_variants_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_version_product_variants_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_version_product_variants_item.additional_properties = d return product_version_product_variants_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/product_version_products_item.py b/component_registry_bindings/bindings/python_client/models/product_version_products_item.py index 44bb8a2..b5422b1 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version_products_item.py +++ b/component_registry_bindings/bindings/python_client/models/product_version_products_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: product_version_products_item.additional_properties = d return product_version_products_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/software_build.py b/component_registry_bindings/bindings/python_client/models/software_build.py index 35f5f6a..36c72a4 100644 --- a/component_registry_bindings/bindings/python_client/models/software_build.py +++ b/component_registry_bindings/bindings/python_client/models/software_build.py @@ -175,6 +175,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: software_build.additional_properties = d return software_build + @staticmethod + def get_fields(): + return { + "link": str, + "web_url": str, + "build_id": int, + "build_type": BuildTypeEnum, + "name": str, + "source": str, + "tags": List[Tag], + "created_at": datetime.datetime, + "last_changed": datetime.datetime, + "components": List[SoftwareBuildComponentsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/software_build_components_item.py b/component_registry_bindings/bindings/python_client/models/software_build_components_item.py index ad60b0c..88f26ac 100644 --- a/component_registry_bindings/bindings/python_client/models/software_build_components_item.py +++ b/component_registry_bindings/bindings/python_client/models/software_build_components_item.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: software_build_components_item.additional_properties = d return software_build_components_item + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/software_build_summary.py b/component_registry_bindings/bindings/python_client/models/software_build_summary.py index d304d4a..484fe2e 100644 --- a/component_registry_bindings/bindings/python_client/models/software_build_summary.py +++ b/component_registry_bindings/bindings/python_client/models/software_build_summary.py @@ -75,6 +75,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: software_build_summary.additional_properties = d return software_build_summary + @staticmethod + def get_fields(): + return { + "link": str, + "build_id": int, + "build_type": BuildTypeEnum, + "name": str, + "source": str, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/tag.py b/component_registry_bindings/bindings/python_client/models/tag.py index 59d08f6..8210ca9 100644 --- a/component_registry_bindings/bindings/python_client/models/tag.py +++ b/component_registry_bindings/bindings/python_client/models/tag.py @@ -60,6 +60,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: tag.additional_properties = d return tag + @staticmethod + def get_fields(): + return { + "name": str, + "created_at": datetime.datetime, + "value": str, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py b/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py index 727726a..2b3de36 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py +++ b/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py @@ -4,6 +4,8 @@ class V1BuildsListBuildType(str, Enum): BREW = "BREW" KOJI = "KOJI" + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) diff --git a/component_registry_bindings/bindings/python_client/models/v1_channels_list_type.py b/component_registry_bindings/bindings/python_client/models/v1_channels_list_type.py index 4db9289..9d49807 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_channels_list_type.py +++ b/component_registry_bindings/bindings/python_client/models/v1_channels_list_type.py @@ -4,6 +4,8 @@ class V1ChannelsListType(str, Enum): CDN_REPO = "CDN_REPO" CONTAINER_REGISTRY = "CONTAINER_REGISTRY" + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) diff --git a/component_registry_bindings/bindings/python_client/models/v1_components_list_namespace.py b/component_registry_bindings/bindings/python_client/models/v1_components_list_namespace.py index 4747104..6772f6b 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_components_list_namespace.py +++ b/component_registry_bindings/bindings/python_client/models/v1_components_list_namespace.py @@ -4,6 +4,8 @@ class V1ComponentsListNamespace(str, Enum): REDHAT = "REDHAT" UPSTREAM = "UPSTREAM" + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) diff --git a/component_registry_bindings/bindings/python_client/models/v1_components_list_type.py b/component_registry_bindings/bindings/python_client/models/v1_components_list_type.py index 067cd80..91d8e3b 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_components_list_type.py +++ b/component_registry_bindings/bindings/python_client/models/v1_components_list_type.py @@ -13,6 +13,8 @@ class V1ComponentsListType(str, Enum): PYPI = "PYPI" RPM = "RPM" RPMMOD = "RPMMOD" + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) diff --git a/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_format.py b/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_format.py index 1af2329..04c0245 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_format.py +++ b/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_format.py @@ -4,6 +4,8 @@ class V1SchemaRetrieveFormat(str, Enum): JSON = "json" YAML = "yaml" + # This is a temporary tweak to accept empty Enum + NONE = "" def __str__(self) -> str: return str(self.value) diff --git a/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_response_200.py b/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_response_200.py index 1bbe154..4ee4532 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_response_200.py +++ b/component_registry_bindings/bindings/python_client/models/v1_schema_retrieve_response_200.py @@ -26,6 +26,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_schema_retrieve_response_200.additional_properties = d return v1_schema_retrieve_response_200 + @staticmethod + def get_fields(): + return {} + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200.py index fbd1e96..cad408d 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200.py @@ -83,6 +83,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200.additional_properties = d return v1_status_list_response_200 + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[V1StatusListResponse200ResultsItem], + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item.py index 963042c..b0cd4ed 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item.py @@ -243,6 +243,24 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item.additional_properties = d return v1_status_list_response_200_results_item + @staticmethod + def get_fields(): + return { + "status": str, + "dt": datetime.datetime, + "service_version": str, + "rest_api_version": str, + "db_size": str, + "builds": V1StatusListResponse200ResultsItemBuilds, + "products": V1StatusListResponse200ResultsItemProducts, + "product_versions": V1StatusListResponse200ResultsItemProductVersions, + "product_streams": V1StatusListResponse200ResultsItemProductStreams, + "product_variants": V1StatusListResponse200ResultsItemProductVariants, + "channels": V1StatusListResponse200ResultsItemChannels, + "components": V1StatusListResponse200ResultsItemComponents, + "relations": V1StatusListResponse200ResultsItemRelations, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_builds.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_builds.py index 8b786f9..490bb02 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_builds.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_builds.py @@ -36,6 +36,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item_builds.additional_properties = d return v1_status_list_response_200_results_item_builds + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_channels.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_channels.py index ad1701f..f02580a 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_channels.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_channels.py @@ -36,6 +36,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item_channels.additional_properties = d return v1_status_list_response_200_results_item_channels + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_components.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_components.py index 1696837..44f2f12 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_components.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_components.py @@ -36,6 +36,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item_components.additional_properties = d return v1_status_list_response_200_results_item_components + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_streams.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_streams.py index a9f88c8..536a5ab 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_streams.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_streams.py @@ -38,6 +38,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) return v1_status_list_response_200_results_item_product_streams + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_variants.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_variants.py index 0c5147a..2e44f20 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_variants.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_variants.py @@ -38,6 +38,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) return v1_status_list_response_200_results_item_product_variants + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_versions.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_versions.py index b1cd466..e133801 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_versions.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_product_versions.py @@ -38,6 +38,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) return v1_status_list_response_200_results_item_product_versions + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_products.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_products.py index e0b99d5..f8060e1 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_products.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_products.py @@ -36,6 +36,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item_products.additional_properties = d return v1_status_list_response_200_results_item_products + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) diff --git a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_relations.py b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_relations.py index f1a6ce1..2dd5dfa 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_relations.py +++ b/component_registry_bindings/bindings/python_client/models/v1_status_list_response_200_results_item_relations.py @@ -36,6 +36,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: v1_status_list_response_200_results_item_relations.additional_properties = d return v1_status_list_response_200_results_item_relations + @staticmethod + def get_fields(): + return { + "count": int, + } + @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) From 8b4ea589128c9988ef2070c181d8cf2a961a47c3 Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Thu, 23 Mar 2023 11:41:26 +0100 Subject: [PATCH 9/9] Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a58943..3b34d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased - +### Added +- add `next()`, `prev()` and `iterator()` methods for paginated + responses to make page browsing easier + ## [1.2.0-beta] - 2023-02-17 ### Added - first experimental release to the PyPI - versioning not yet fully synced with Component Registry